forked from pramodramdas/digital_healthcare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
30 lines (23 loc) · 834 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require('dotenv').config();
const { init_web3 } = require('./server-utils/web3-util.js');
init_web3();
const express = require('express');
const morgan = require('morgan');
const bodyParser = require('body-parser');
//const helmet = require('helmet');
const MetaAuth = require('meta-auth');
const app = express();
const metaAuth = new MetaAuth();
//app.use(helmet());
//web3.eth.defaultAccount = web3.eth.accounts[0];
//console.log(healthCare.checkProfile(0xa113b22d40dc1d5d086003c27a556e597f614e8b));
//console.log(web3.eth.accounts);
app.use(morgan('combined'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: false,
}));
require('./routes/auth-routes')(app, metaAuth);
require('./routes/api-routes')(app);
app.listen(9090, () => console.log("server up and listening at 9090"));
module.exports = app;