How to open SailJS console in terminal?
The biggest advantage of interpreter language is the use of a console. Be it Python or NodeJS, a developer can quickly open the shell and see execute snippets of the code.
Once you start using the framework, suddenly the comfort of using a console goes away if the framework doesn't support it, which also drops the developer productivity. Framework contributors understand this problem and now every modern framework supports console integration out of the box. Coming from Django, I was very much attached to the idea of using console for my day to day work in Django. But when I started to work SailsJS with console, it was tricky to find a command to enter sails console, until I found the following command.
npm install -g sails sails console --dontLift
First, you need to install
sails in the global scope and then run the console command, the
--dontLift flag is important when you are having the sails server running. For details visit sails documentation
Inside the console you would find
sails variable accessible which has all the global scope value.