1

I want to move some api functions to the shared file and have access to this functions from different controllers. The structure have to look like this:

enter image description here

How can I do it using Sails.js?

1 Answer 1

1

Services are designed for this purpose.

Services are basically libraries, which contain functions that you might want to use in many places of your application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.