From e9d0438f6c02664c652a593c686564361fa0de6b Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 9 Jun 2020 14:16:15 +0300 Subject: refactor: structurize feathers app --- index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 index.ts (limited to 'index.ts') diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..35d1411 --- /dev/null +++ b/index.ts @@ -0,0 +1,14 @@ +import app from './app'; + +// Add any new real-time connection to the `everybody` channel +app.on('connection', connection => + app.channel('everybody').join(connection) +); +// Publish all events to the `everybody` channel +app.publish(data => app.channel('everybody')); + + +app.listen(3030).on('listening', () => + console.log('Feathers server listening on localhost:3030') +); + -- cgit v1.2.3