How can I control which port is used for the Amber Smalltalk node.js server?

Sometimes I need to run two node servers on two different Amber Smalltalk tests, and it would be very convenient to control this with a run script, but my reading of the run script tells me that I will need to edit the code, which is not perfect.

+3


source to share


2 answers


In the words of Johnny Thornton :

in the server /FileServer.st - after you updated it - I think there is a Makefile in the same directory to help you recompile



So there is no way to do this (currently ~ Amber 0.9.3) without editing the directlty file.

+1


source


Starting today , it is now possible to specify a port for a NodeJS based server in the Amber developer version. This option is included in the 0.10.0 release for Amber.

The next line will start the server on the port 12345

:

node server/server.js -p 12345



EDIT:

Both the amber REPL and the amber server are bundled into a regular amber-cli tool. Starting with Amber 0.11.0, the server can be started by running the following command:

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

+5


source







All Articles