-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
27 lines (22 loc) · 855 Bytes
/
app.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
const express = require('express');
const path = require('path');
const app = express();
const login = require('./controllers/login');
const coachreg = require('./controllers/coachreg');
const clubreg = require('./controllers/clubreg');
const dashboard = require('./controllers/dashboard');
const reset = require('./controllers/reset');
app.use(express.static(path.join(__dirname, 'dist/bounx')));
app.use('/login',login);
app.use('/register/coachreg',coachreg);
app.use('/register/clubreg',clubreg);
app.use('/dashboard',dashboard);
app.use('/reset',reset)
app.get('*', (req,res)=>{
res.sendFile(path.join(__dirname, 'dist/bounx/index.html'));
});
var server = app.listen(process.env.PORT || 3000, function () {
var host = server.address().address
var port = server.address().port
console.log('App listening at http://%s:%s', host, port)
})