Skip to content

Commit

Permalink
clase 15
Browse files Browse the repository at this point in the history
  • Loading branch information
andreybejarano committed Jul 6, 2022
1 parent 10282c9 commit 103e2fd
Show file tree
Hide file tree
Showing 15 changed files with 2,465 additions and 0 deletions.
30 changes: 30 additions & 0 deletions clase15/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const express = require('express');
const path = require('path');

const app = express();

app.use(express.json());
app.use(express.urlencoded({extended: false}));

const pathPublic = path.resolve(__dirname, './public');
app.use(express.static(pathPublic));

app.get('/', (req,res)=>{
res.sendFile(__dirname + '/views/home.html');
});

app.post('/', (req, res) => {
res.redirect('/');
});

app.get('/register', (req,res)=>{
res.sendFile(__dirname + '/views/register.html');
});

app.get('/login', (req,res)=>{
res.sendFile(__dirname + '/views/login.html');
});

app.listen(3000, ()=>{
console.log('Servidor funcionando en: http://localhost:3000');
});
23 changes: 23 additions & 0 deletions clase15/flex.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="/styles.css">
</head>
<body>
<div class="container">
<div class="wrap">
<div class="element box1">1</div>
<div class="element box2">2</div>
<div class="element box3">3</div>
<div class="element box4">4</div>
<div class="element box1">5</div>
<div class="element box2">6</div>
<div class="element box3">7</div>
</div>
</div>
</body>
</html>
Loading

0 comments on commit 103e2fd

Please sign in to comment.