Skip to content

Support for a pre-run step would help when using transpilation #46

Description

@51ngul4r1ty

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions