最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Run sails.js on a specific IP address during development - Stack Overflow

programmeradmin4浏览0评论

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 badges
Add a ment  | 

2 Answers 2

Reset to default 12

You 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

发布评论

评论列表(0)

  1. 暂无评论