I am new to sails.js and trying to develop a simple app on a remote sandbox server. When I do 'sails lift'
to test running the app, I cannot access it by 'localhost'
.
I am wondering what's the right way of running sails on a specific IP during development. I tried 'sails lift --ip xxx.xxx.xx.xx'
, but it does not work, and the documentation on this seems lacking.
Does anyone know how to run sails.js on an IP without needing deployment?
I am new to sails.js and trying to develop a simple app on a remote sandbox server. When I do 'sails lift'
to test running the app, I cannot access it by 'localhost'
.
I am wondering what's the right way of running sails on a specific IP during development. I tried 'sails lift --ip xxx.xxx.xx.xx'
, but it does not work, and the documentation on this seems lacking.
Does anyone know how to run sails.js on an IP without needing deployment?
Share Improve this question asked Dec 23, 2014 at 16:19 TonyWTonyW 18.9k42 gold badges117 silver badges190 bronze badges2 Answers
Reset to default 12You need to use local.js
in config directoty to add this config:
{
host: your_ip,
port: your_port
}
Or add port
and host
in config/env/development.js
For anyone looking for Sails 1.x, as host is deprecated in new version, so new name for specifying host is, "explicitHost".
So one can mention in config/env/development.js
explicitHost: 'your_ip_Address'
port: 'your_port_number'
For more, sails documentation for these kind of settings