Express server starter (simplified)
[scripting/actions/Express server starter (simplified)]
Starts an express server on the specified port and with the specified middlewares. Specifying an 'app-id' allows running multiple express servers at the same time. Writes the app ID of the started server to state. Repeatable action.
Keywords: express, api, server, routing, initialize
Input ports
state:
any
Receives script state.
params:
Receives:
'cwd' locates directory for persisted state
'app-id' identifies Express server (default: "default")
'port' specifies port to run server on (default: 8080)
'middlewares' lists express middlewares to be activated (default: [])
Example: { "cwd": "./express", "middlewares": ["json"] }
Output ports
state:
any
Sends updates script state.
Last updated