-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
57 lines (38 loc) · 1.39 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const express = require('express');
const path = require('path')
let app = express();
app.use(express.static('public'));
app.set('puerto',process.env.PORT || 3030)
app.listen(app.get('puerto'), ()=> console.log(`Servidor escuchando en puerto ${app.get('puerto')}`));
app.get('/', function(req, res){
let htmlPath = path.resolve(__dirname,'./views/index.html');
res.sendFile(htmlPath);
});
app.get('/babbage', function(req, res){
let htmlPath = path.resolve(__dirname,'./views/babbage.html');
res.sendFile(htmlPath);
});
app.get('/berners-lee', function(req, res){
let htmlPath = path.resolve(__dirname,'./views/berners-lee.html');
res.sendFile(htmlPath);
});
app.get('/clarke', function(req, res){
let htmlPath = path.resolve(__dirname,'./views/clarke.html');
res.sendFile(htmlPath);
});
app.get('/hamilton', function(req, res){
let htmlPath = path.resolve(__dirname,'./views/hamilton.html');
res.sendFile(htmlPath);
});
app.get('/hopper', function(req, res){
let htmlPath = path.resolve(__dirname,'./views/hopper.html');
res.sendFile(htmlPath);
});
app.get('/lovelace', function(req, res){
let htmlPath = path.resolve(__dirname,'./views/lovelace.html');
res.sendFile(htmlPath);
});
app.get('/turing', function(req, res){
let htmlPath = path.resolve(__dirname,'./views/turing.html');
res.sendFile(htmlPath);
});