then find // port: 80 end, uncomment it in config / env / production.js and specify any port you want
after that run the following command
NODE_ENV = production pm2 start app.js - --prod
this will work fine, but if you want -i max than.
NODE_ENV = production start pm2 app.js --name "myapp" -i max - --prod
in the above command, if you solve any problem regarding grunt, than open the task /register/prod.js and comment below the line
module.exports = function(grunt) { grunt.registerTask('prod', [ // 'polyfill:prod', //Β« Remove this to skip transpilation in production (not recommended) // 'compileAssets', // 'babel', //Β« Remove this to skip transpilation in production (not recommended) // 'concat', // 'uglify', // 'cssmin', // 'sails-linker:prodJs', // 'sails-linker:prodStyles', // 'sails-linker:clientSideTemplates', ]); };
source share