-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
18 lines (15 loc) · 1.08 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const express = require('express')
const path = require('path')
const app = express()
const port = 3030
app.use(express.static(path.join(__dirname,'public')))
app.get('/', (req,res) => res.sendFile(path.resolve(__dirname, 'views', 'index.html')))
app.get('/turing',(req,res) =>res.sendFile(path.resolve(__dirname, 'views', 'turing.html')))
app.get('/lovelace',(req,res) =>res.sendFile(path.resolve(__dirname, 'views', 'lovelace.html')))
app.get('/hooper',(req,res) =>res.sendFile(path.resolve(__dirname, 'views', 'hooper.html')))
app.get('/hamilton',(req,res) =>res.sendFile(path.resolve(__dirname, 'views', 'hamilton.html')))
app.get('/clarke',(req,res) =>res.sendFile(path.resolve(__dirname, 'views', 'clarke.html')))
app.get('/berners-lee',(req,res) =>res.sendFile(path.resolve(__dirname, 'views', 'berners-lee.html')))
app.get('/babbage',(req,res) =>res.sendFile(path.resolve(__dirname, 'views', 'babbage.html')))
app.get('/*',(req,res) =>res.sendFile(path.resolve(__dirname, 'views', '404.html')))
app.listen(port, () => console.log(`Se levanto con exito el servidor en http://localhost:${port}`))