-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (17 loc) · 747 Bytes
/
index.js
File metadata and controls
26 lines (17 loc) · 747 Bytes
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
const express = require('express');
const app = express();
const axios = require('axios');
const handlebars = require('express-handlebars');
app.engine('handlebars', handlebars.engine());
app.set('view engine', 'handlebars');
app.set('views', './views');
app.use(express.urlencoded({ extended: false }));
app.use(express.static('public'));
app.use(express.json());
app.get('/', async (_req, _res) => _res.render('index.handlebars', {}))
app.use('/investec', require('./routes/investec'))
// TODO upgrade this to catching on the controller level and returning a json error, rather than just timing out on the request side (but not breaking)
process.on('uncaughtException', function(err) {
console.log(err)
})
app.listen(3000, () => { })