Run sails.js at a specific IP address during development

I am new to sails.js and trying to create a simple application on a remote sandbox server. When I execute a 'sails lift' to check if the application is starting up, I cannot access it using 'localhost' .

I am wondering how to properly manage sails on a specific IP during development . I tried 'sails lift --ip xxx.xxx.xx.xx' , but it does not work, and there is not enough documentation on this.

Does anyone know how to run sails.js on IP without the need for deployment?

+7
source share
2 answers

You need to use local.js in config directoty to add this configuration: { host: your_ip, port: your_port }

Or add port and host to config/env/development.js

+11
source

in sail 1.0, run this on the terminal

 > sails lift --port 192.168.0.1:1337 
0
source

Source: https://habr.com/ru/post/1209782/


All Articles