Create server and router instances (prior to load) Create server and router instances (prior to load)
Http/s server.
Koa app.
Served address.
Koa sub-router for request messages.
Koa router.
Timestamp for server startup.
Get the root URL being served
Start listening on configured port, cycling up port number if in use.
Initialise server and router, adding logger middleware
Use nested router for message endpoints, feeding into thought process. Data can be sent by POST (JSON body) or GET (as query params). The Room ID is an optional param on the route, but without a room ID, the bot may fail in dispatching a response, depends on the messaging platform.
Public routes serve content without entering thought process/middleware
Data for /public route to share basic operating stats
Close server
Start server listening on configured port and protocol
Generated using TypeDoc
Load and start server to listen for data over HTTP/s