When writing back-end code in a language other than Javascript it is helpful to be able to run a build step prior to starting the server process. I'm proposing the introduction of a "prerun" step that can be configured per process.
The fuge.yml file can be set up as follows:
nodeservice:
type: process
path: ../../nodeservice
run: node srv/start.js
ports:
- nodeservice=9010
tsservice:
type: process
path: ../../tsservice
prerun: npm run build
run: node build/srv/start.js
ports:
- tsservice=9020
The first entry shows a standard node process. The second shows a service that uses a prerun step (npm run build) to build the javascript files that are then run using the run step.
The prerun step solves the problem of a different process ID being assigned after the service is built. Using just run you end up with the process ID of npm itself and the process that starts up has a different ID. This makes it hard to attach to the running process using fuge.
When writing back-end code in a language other than Javascript it is helpful to be able to run a build step prior to starting the server process. I'm proposing the introduction of a "prerun" step that can be configured per process.
The fuge.yml file can be set up as follows:
The first entry shows a standard node process. The second shows a service that uses a prerun step (
npm run build) to build the javascript files that are then run using therunstep.The
prerunstep solves the problem of a different process ID being assigned after the service is built. Using justrunyou end up with the process ID of npm itself and the process that starts up has a different ID. This makes it hard to attach to the running process using fuge.