summaryrefslogtreecommitdiff
path: root/src/app.js
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-11-14 16:31:59 +0300
committereug-vs <eug-vs@keemail.me>2020-11-14 16:31:59 +0300
commit36465387454cdb797f886f732d40a70faa92cbad (patch)
tree28616bd04e3e98c5bd40e82b0c674a0ea9437357 /src/app.js
parent2a791b8999dc08824baf6787021d45df676b4088 (diff)
downloadbsu-fantom-36465387454cdb797f886f732d40a70faa92cbad.tar.gz
refactor: reuse Mongoose connection in Agenda
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
new file mode 100644
index 0000000..45f9e61
--- /dev/null
+++ b/src/app.js
@@ -0,0 +1,23 @@
+const feathers = require('@feathersjs/feathers');
+const express = require('@feathersjs/express');
+const socketio = require('@feathersjs/socketio');
+const cors = require('cors')
+
+const services = require('./services');
+
+
+const app = express(feathers());
+
+app.use(express.json());
+app.use(express.urlencoded({ extended: true }));
+app.use(express.static(__dirname));
+app.use(express.errorHandler());
+app.use(cors());
+
+app.configure(express.rest());
+app.configure(socketio());
+app.configure(services);
+
+
+module.exports = app;
+