-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2fcc9d6
Showing
19 changed files
with
1,225 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// 1) Me traigo express | ||
const express = require("express"); | ||
// 2) Me traigo bodyparser | ||
const bodyParser = require("body-parser"); | ||
// 3) Me traigo las rutas que necesito "escuchar" | ||
const apiRoutes = require("./routes/apiRoutes"); | ||
const indexRoutes = require("./routes/indexRoutes"); | ||
// const adminRoutes = require("./routes/adminRoutes"); | ||
// const vendorRoutes = require("./routes/vendorRoutes"); | ||
const path = require ("path"); | ||
|
||
// 4) Defino mi aplicacion con express | ||
const app = express(); | ||
|
||
// 5) Le digo a mi servidor que use bodyParser | ||
app.use(bodyParser.json()); | ||
app.use(bodyParser.urlencoded({ extended: true })); | ||
|
||
// 6) Le digo a mi servidor que cuando el cliente haga una peticion | ||
// vaya a buscar la ruta correspondiente | ||
// app.use("/", routes); | ||
// agrego esto porque no tengo variables de entorno (extensions.js?) | ||
app.listen(3000, function(){console.log('server listening')}); | ||
|
||
// app.use("/admin", adminRoutes) | ||
// app.use("/vendor", vendorRoutes) | ||
|
||
// esta es la ruta de los archivos estaticos | ||
app.use(express.static(path.join(__dirname, "/public"))); | ||
|
||
app.use("/api", apiRoutes); | ||
app.use("/", indexRoutes); | ||
|
||
module.exports = app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="/css/style.css"> | ||
<title>Editar Usuario</title> | ||
</head> | ||
<body> | ||
<section> | ||
<div class="title"> | ||
<h2>Editar usuario</h2> | ||
</div> | ||
<div class="formulario"> | ||
<form> | ||
<div class="field"><i class="fas fa-user"></i><input type="text" maxlength="30" placeholder="Nombre" name="nombre"></div> | ||
<div class="field"><span style="padding-right: 15px"></span><input type="text" maxlength="30" placeholder="Apellido" name="apellido"></div> | ||
<div class="field"><i class="fas fa-phone"></i><input type="text" placeholder="Email" name="email"></div> | ||
<div class="field"><i class="fas fa-envelope"></i><input type="text" placeholder="Telefono" name="telefono"></div> | ||
<div class="footer-form"> | ||
<button id="btn-edit" type="button">Guardar Cambios</button> | ||
</div> | ||
</form> | ||
</section> | ||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | ||
<script src="/javascripts/edit.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="/css/style.css"> | ||
<title>CRUD</title> | ||
</head> | ||
<body> | ||
<div class="users-table"> | ||
<div class="form-container"> | ||
<form id="filter-form"> | ||
<input type="text" name="filtro" placeholder="Buscar..."> | ||
<button type="button" class="btn-filter"><i class="fas fa-search"></i></button> | ||
</form> | ||
</div> | ||
<table id="table-users"></table> | ||
<div class="footer-table"> | ||
<a href="/index/new"><button id="btn-nuevo"><i class="fas fa-user-plus"></i> Agregar</button></a> | ||
</div> | ||
</div> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | ||
<script src="/javascripts/index.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="/css/style.css"> | ||
<title>Nuevo usuario</title> | ||
</head> | ||
<body> | ||
<section> | ||
<div class="title"> | ||
<h2>Ingresar nuevo usuario</h2> | ||
</div> | ||
<div class="formulario"> | ||
<div class="field"><i class="fas fa-user"></i><input type="text" name="name" placeholder="Nombre"></div> | ||
<div class="field"><span style="padding-right: 14px"></span><input type="text" name="lastname" placeholder="Apellido"></div> | ||
<div class="field"><i class="fas fa-phone"></i><input type="number" name="phone" placeholder="Teléfono"></div> | ||
<div class="field"><i class="fas fa-envelope"></i><input type="text" name="email" placeholder="Email"></div> | ||
<div class="footer-form"><button id="form" type="button"><i class="fas fa-check"></i> Guardar</button></div> | ||
</div> | ||
</section> | ||
</body> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | ||
<script type="text/javascript" src="/javascripts/new.js"></script> | ||
</html> |
Oops, something went wrong.