简体   繁体   English

如何控制用于Amber Smalltalk node.js服务器的端口?

[英]How do I control which port is used for the Amber Smalltalk node.js server?

偶尔我需要在两个不同的Amber Smalltalk检出中运行两个节点服务器,并且能够通过启动脚本控制它是非常方便的,但是我对启动脚本的读取告诉我,我将不得不编辑一些代码,这不是理想的。

Starting from today it is now possible in the Amber developer version to specify the port for the NodeJS based server. 从今天开始,现在可以在Amber开发人员版本中为基于NodeJS的服务器指定端口。 This option is included in the 0.10.0 release of Amber. 此选项包含在Amber的0.10.0版本中。

The following line will start the server on port 12345 : 以下行将在端口12345上启动服务器:

node server/server.js -p 12345

EDIT: 编辑:

Both Amber REPL and Amber Server have been merged into a common tool called amber-cli. Amber REPL和Amber Server都已合并为一个名为amber-cli的常用工具。 Starting with Amber 0.11.0 the server can be started by executing the following command: 从Amber 0.11.0开始,可以通过执行以下命令来启动服务器:

node ./cli/js/amber-cli.js serve --port 12345 --host 0.0.0.0

According to Johnny Thornton : 根据约翰尼桑顿的说法

in server/FileServer.st - after you have updated it there - I think there is a Makefile in that same dir to help you recompile 在server / FileServer.st中 - 在你更新它之后 - 我认为在同一目录中有一个Makefile来帮助你重新编译

So there's no way to do it (currently ~ Amber 0.9.3) without editing a file directlty. 所以没有办法直接编辑文件就没办法(目前~Amber 0.9.3)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM