-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathapp.js
24 lines (17 loc) · 839 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
// app.js
const express = require('express');
const bodyParser = require('body-parser');
const index = require('./routes/index.route');
const admin = require('./routes/admin.route');
const app = express();
app.set('view engine', 'ejs');
app.use('/js', express.static(__dirname + '/node_modules/bootstrap/dist/js')); // redirect bootstrap JS
app.use('/js', express.static(__dirname + '/node_modules/jquery/dist')); // redirect JS jQuery
app.use('/css', express.static(__dirname + '/node_modules/bootstrap/dist/css')); // redirect CSS bootstrap
app.use('/fontawesome', express.static(__dirname + '/node_modules/@fortawesome/fontawesome-free/')); // redirect CSS fontawesome
app.use('/', index);
app.use('/admin', admin)
let port = 4500;
app.listen(port, () => {
console.log('Server is up and running on port numner ' + port);
});