Listener

[sdks/expressjs/Listener]


Sets up the specified Express server to listen on the specified port. Example:

  1. "my-express-server"@0 received on app ID

  2. 3000@0 received on port

  3. Express server is started to listen on http//localhost:3000 4/a. In case of success

  • null@0 sent on done

  • "my-express-server"@0 sent on app iD 4/b. In case of failure

  • { "code": "EADDRINUSE", "errno": -98, "syscall": "listen", "address": "::", "port": 3000 }@0 sent on error


Keywords: express, http, server, start

Input ports

  • app ID: string

    The id of the express instance. Example: "my-express-server"

  • params: ({"port": number, "host": string} or number)

    The port number express should listen to. Example: 3000

Output ports

  • done: (null or {"port": number, "hostname": string})

    Event triggered when the action has been executed.

  • error: {"error": string, "origin": string}

    Sends error information in case the specified action could not be successfully executed. Example: { "error": "listen EADDRINUSE: address already in use 127.0.0.1:8080", "origin": "server" }

  • app ID: string

    DEPRECATED The id of the express instance the action was executed on. Emitted when the action was executed. To be used when chaining multiple actions on the same express instance. Example: "my-express-server"

Last updated