简体   繁体   中英

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. This option is included in the 0.10.0 release of Amber.

The following line will start the server on port 12345 :

node server/server.js -p 12345

EDIT:

Both Amber REPL and Amber Server have been merged into a common tool called amber-cli. Starting with Amber 0.11.0 the server can be started by executing the following command:

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

So there's no way to do it (currently ~ Amber 0.9.3) without editing a file directlty.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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