aboutsummaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-06-12 20:21:30 +0300
committerGitHub <noreply@github.com>2020-06-12 20:21:30 +0300
commit1860396a1286936374ab88937da3e0b6b9b1a36d (patch)
treeeb905fa1307833c1ab856c387be2fa533ed2ea34 /index.ts
parent0ecf99e2749fe60a20e86b266c6019ebb56e021a (diff)
parent7e4ebee9a0e56546d6dce76c5c48d6d13371c689 (diff)
downloadwhich-api-1860396a1286936374ab88937da3e0b6b9b1a36d.tar.gz
Merge pull request #6 from eug-vs/eslint
Eslint
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts16
1 files changed, 6 insertions, 10 deletions
diff --git a/index.ts b/index.ts
index 6db8929..8b01536 100644
--- a/index.ts
+++ b/index.ts
@@ -1,6 +1,6 @@
-import app from './app';
import mongoose from 'mongoose';
import Promise from 'bluebird';
+import app from './app';
mongoose.Promise = Promise;
@@ -8,20 +8,16 @@ mongoose.connect('mongodb://localhost:27017/which', { useNewUrlParser: true });
const db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
-db.once('open', function() {
+db.once('open', () => {
console.log('Connection to MongoDB successful');
});
// Add any new real-time connection to the `everybody` channel
-app.on('connection', connection =>
- app.channel('everybody').join(connection)
-);
+app.on('connection', connection => app.channel('everybody').join(connection));
// Publish all events to the `everybody` channel
-app.publish(data => app.channel('everybody'));
+app.publish(() => app.channel('everybody'));
-const port = 3030
-app.listen(port).on('listening', () =>
- console.log(`Feathers server listening on localhost:${port}`)
-);
+const port = 3030;
+app.listen(port).on('listening', () => console.log(`Feathers server listening on localhost:${port}`));