-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
70 lines (52 loc) · 1.8 KB
/
server.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
'use strict'
var express = require('express');
var app = express();
var request = require('request');
var path = require('path');
app.set('views', __dirname + '/src');
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');
var port = 4000;
console.log(' Starting server on port %d ', port);
//console.log(path.join(__dirname + '/template/css'));
app.use(express.static(path.join(__dirname + '/src')));
app.use(express.static(path.join(__dirname + '/build')));
// app.use(express.static(path.join(__dirname + '/src/template')));
app.listen(port);
console.log("port started");
app.get('/', function(req, res, next) {
res.render('template/inmobi.html');
console.log("got your hit : refreshing");
});
app.get('/inmobi2', function(req, res, next) {
res.render('template/inmobisecond.html');
console.log("got your hit : refreshing");
});
app.get('/twit', function(req, res, next) {
res.render('template/twit.html');
console.log("got your hit : refreshing");
});
app.get('/brstck', function(req, res, next) {
res.render('template/brstck.html');
console.log("got your hit : refreshing");
});
app.get('/maaco', function(req, res, next) {
res.render('template/maaco.html');
console.log("got your hit : refreshing");
});
app.get('/whatsThat', function(req, res, next) {
res.render('template/practiceOther.html');
console.log("got your hit : refreshing");
});
app.get('/median', function(req, res, next) {
res.render('template/modemedian.html');
console.log("got your hit : refreshing");
});
app.get('/hk', function(req, res, next) {
res.render('template/hk.html');
console.log("got your hit : refreshing");
});
app.get('/innplex', function(req, res, next) {
res.render('template/innplex.html');
console.log("got your hit : refreshing");
});