From 36465387454cdb797f886f732d40a70faa92cbad Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 14 Nov 2020 16:31:59 +0300 Subject: refactor: reuse Mongoose connection in Agenda --- src/app.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/app.js (limited to 'src/app.js') 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; + -- cgit v1.2.3