-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
31 lines (24 loc) · 773 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
28
29
30
31
(function () {
const express = require('express');
const app = express();
const port = 4000;
const bodyParser = require('body-parser');
app.use("/", express.static(__dirname + '/static'));
app.use("/images", express.static(__dirname + '/static/images'));
app.use(bodyParser.urlencoded({
extended: true
}));
app.get('/', (req, res) => {
res.sendFile(__dirname + '/static/index.html');
});
app.get('/images', (req, res) => {
res.sen(__dirname + "/static/images");
})
app.get('/player', (req, res) => {
res.sendFile(__dirname + '/static/player.html');
});
app.listen(port, () => {
console.log('Server started on port : ' + port);
});
module.exports = app;
}());