[英]Bind sails.js app to a specific ip
I have a Nodejs project and is using sails.js mvc framework. 我有一个Nodejs项目,正在使用sails.js mvc框架。 Now, Im ready to deploy it, but before that one requirement is to bind it to a different ip. 现在,我准备部署它,但在此之前的一个要求是将其绑定到其他ip。 Is there a way on sails.js that we can achieve this? 在sails.js上有没有一种方法可以实现这一目标? What file or config should I update? 我应该更新什么文件或配置?
I've tried @xShirase answer and it worked too. 我尝试了@xShirase答案,它也起作用。 So I have it marked as answer. 因此,我将其标记为答案。 Anyhow, this is what I did on my end: 无论如何,这就是我最终所做的:
I added application.js
on config, config/application.js
then added this line module.exports.host = '<ip here>';
我在配置上添加了application.js
, config/application.js
然后添加了这一行module.exports.host = '<ip here>';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.