-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
36 lines (27 loc) · 782 Bytes
/
app.js
File metadata and controls
36 lines (27 loc) · 782 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
27
28
29
30
31
32
33
34
35
36
const express = require('express');
const app = express();
const router = express.Router();
const path = __dirname + '/views/';
const port = 8080;
router.use(function (req,res,next) {
console.log('/' + req.method);
next();
});
router.get('/', function(req,res){
res.sendFile(path + 'index.html');
});
router.get('/simple', function(req,res){
res.sendFile(path + 'VueTestSimple.html');
});
router.get('/grid', function(req,res){
res.sendFile(path + 'vuegrid.html');
});
router.get('/test2', function(req,res){
res.sendFile(path + 'VueTest2.html');
});
app.use(express.static(path));
app.use('/node_modules', express.static(__dirname + '/node_modules'));
app.use('/', router);
app.listen(port, function () {
console.log('Example app listening on port 8080!')
})