aboutsummaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-12 20:08:58 +0300
committereug-vs <eug-vs@keemail.me>2020-06-12 20:08:58 +0300
commit2a4e1ff734533a026ebf4122c31355e2dffba1b2 (patch)
treee74bb1610373c4984ca9df11f9161b0abbd7f443 /index.ts
parent755889e7c1c74b0bd7677fc513d04473689eaf57 (diff)
downloadwhich-api-2a4e1ff734533a026ebf4122c31355e2dffba1b2.tar.gz
style: fix some eslint errors
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts14
1 files changed, 5 insertions, 9 deletions
diff --git a/index.ts b/index.ts
index 6db8929..6458124 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'));
-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}`));