Reputation: 1146
I need to build a few tasks that import various data from outside APIs in my SailsJS project. I was thinking of using laterJS (unless there's a better option).
Is there a best practice for the location and loading of these "task" files?
Upvotes: 2
Views: 551
Reputation: 1106
The place where I think it should go is file config/bootstrap.js.
Description of this file from sails-docs:
This is an asynchronous boostrap function that runs before your Sails app gets lifted (i.e. > starts up). This gives you an opportunity to set up your data model, run jobs, or perform some special logic.
Upvotes: 1