2

How can I override sails.js view hook for res.view.js file?

How is it possible to customize this file in our project and overwrite it? In which folder, and with what name?

I cannot find any standard documentation for folder path converting names and details.

LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114

1 Answers1

2

In api/responses/*.js

You can create your own responses. In here you can customize what ever you like and even edit the ones that are already there.

http://sailsjs.org/#!/documentation/concepts/Custom-Responses

Example, create api/responses/myView.js

Then you can use res.myView()

Meeker
  • 5,979
  • 2
  • 20
  • 38