-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
29 lines (22 loc) · 849 Bytes
/
Copy pathapp.js
File metadata and controls
29 lines (22 loc) · 849 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
var express = require('express')
var app = express()
var path = require('path')
var bodyParser = require('body-parser')
var methodOverride = require('method-override')
app.use(express.static(path.join(__dirname,'static/js')));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended:true}));
app.use(methodOverride());
app.get('/', function(request, response, next){
response.sendFile(path.join(__dirname,"static/home.html"));
});
app.get('/dashboard', function(request, response, next){
response.sendFile(path.join(__dirname,"static/dashboard.html"));
});
app.get('/child', function(request, response, next){
response.sendFile(path.join(__dirname,"static/threejs.html"));
});
app.get('/parent', function(request, response, next){
response.sendFile(path.join(__dirname,"static/parent.html"));
});
app.listen(3000)