Skip to content

Commit

Permalink
se sirven estaticos sobre la raiz
Browse files Browse the repository at this point in the history
  • Loading branch information
andreybejarano committed Jun 22, 2022
1 parent 25d71e0 commit 8f3dae5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion clase11/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path');
const app = express();

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

app.get('/', (req,res)=>{
res.sendFile(__dirname + '/views/home.html');
Expand Down
20 changes: 10 additions & 10 deletions clase11/views/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>
<header>
<img src="static/images/logo-mercado-liebre.svg" width="360" alt="Logo de MercadoLiebre">
<img src="/images/logo-mercado-liebre.svg" width="360" alt="Logo de MercadoLiebre">
<p>Lugar para poner barra de búsqueda</p>
<p><!--iconito de mano-->Comprá en cuotas y sin tarjeta de crédito</p>
<nav>
Expand All @@ -25,50 +25,50 @@
</nav>
</header>
<section>
<img src="static/images/img-home-banner.jpg" width="360" alt="Banner de ofertas">
<img src="/images/img-home-banner.jpg" width="360" alt="Banner de ofertas">
</section>
<main>
<section>
<h3>Basado en tu última visita</h3>
<img src="static/images/img-cafetera-moulinex.jpg" width="360" alt="Cafetera" class="product_img">
<img src="/images/img-cafetera-moulinex.jpg" width="360" alt="Cafetera" class="product_img">
<!--iconito de camión-->
<p >$6.770</p>
<p>40% off</p>
<h4>Cafetera Moulinex</h4>
<img src="static/images/img-macbook-pro-2019.jpg" width="360" alt="MacBook" class="product_img">
<img src="/images/img-macbook-pro-2019.jpg" width="360" alt="MacBook" class="product_img">
<!--iconito de camión-->
<p >$230.000</p>
<p>20% off</p>
<h4>MacBook Pro 2019</h4>
<img src="static/images/img-samsung-galaxy-s10.jpg" width="360" alt="Teléfono Móvil Samsung Galaxy" class="product_img">
<img src="/images/img-samsung-galaxy-s10.jpg" width="360" alt="Teléfono Móvil Samsung Galaxy" class="product_img">
<!--iconito de camión-->
<p >$70.500</p>
<p>10% off</p>
<h4>Teléfono móvil Samsung Galaxy S10</h4>
<img src="static/images/img-tv-samsung-smart.jpg" width="360" alt="SmartTv Samsung" class="product_img">
<img src="/images/img-tv-samsung-smart.jpg" width="360" alt="SmartTv Samsung" class="product_img">
<!--iconito de camión-->
<p >$23.200</p>
<p>5% off</p>
<h4>SmartTv Samsung 43"</h4>
</section>
<section>
<h3>Ofertas</h3>
<img src="static/images/img-cafetera-moulinex.jpg" width="360" alt="Cafetera" class="product_img">
<img src="/images/img-cafetera-moulinex.jpg" width="360" alt="Cafetera" class="product_img">
<!--iconito de camión-->
<p >$6.770</p>
<p>40% off</p>
<h4>Cafetera Moulinex</h4>
<img src="static/images/img-macbook-pro-2019.jpg" width="360" alt="MacBook" class="product_img">
<img src="/images/img-macbook-pro-2019.jpg" width="360" alt="MacBook" class="product_img">
<!--iconito de camión-->
<p >$230.000</p>
<p>20% off</p>
<h4>MacBook Pro 2019</h4>
<img src="static/images/img-samsung-galaxy-s10.jpg" width="360" alt="Teléfono Móvil Samsung Galaxy" class="product_img">
<img src="/images/img-samsung-galaxy-s10.jpg" width="360" alt="Teléfono Móvil Samsung Galaxy" class="product_img">
<!--iconito de camión-->
<p >$70.500</p>
<p>10% off</p>
<h4>Teléfono móvil Samsung Galaxy S10</h4>
<img src="static/images/img-tv-samsung-smart.jpg" width="360" alt="SmartTv Samsung" class="product_img">
<img src="/images/img-tv-samsung-smart.jpg" width="360" alt="SmartTv Samsung" class="product_img">
<!--iconito de camión-->
<p >$23.200</p>
<p>5% off</p>
Expand Down

0 comments on commit 8f3dae5

Please sign in to comment.