const server = new Server();
server.createServer();
server.listen(PORT)
...
const { app } = server;
app.append(<url>, async (req, res) => {...});
...
...
const { app } = server;
app.append('/route/:slug', async (req, res) => {...});
...
...
channel = new Channel(options);
app.append('route', async (req, res) => {
...
await channel.subscribe(req, res, events?: Array<string>);
...
});
...
...
app.append('post/route', async (req, res) => {
...
await channel.publish(message, event)
...
});