javascript - Environment variable in app.js file in sails.js -
i access environment variable (config/env/development) within app.js file.
how go getting variables in file?
i think can variables in illustration view using sails.config.variablename, not have sails variable.
what doing adding setinterval(function() { stufftodo }, 60000);
this @ end of app.js file. able set 60000 environment variable read here.
thanks
the config object available on sails app instance (sails). default, exposed on global scope during lift, , hence available anywhere in app.
source: http://sailsjs.org/#/documentation/concepts/configuration
that means should able access sails variable within app.js file!
javascript sails.js
No comments:
Post a Comment