// 1.- Importar el módulo de "readline (Permitir al usuario digitar desde la terminal)"
const readline = require("readline");
// 2.- Configurar el módulo de "readline" y guardarlo en la variable "rl"
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
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
/** | |
* @description Error middleware for handling errors in the application | |
* and converting them to a standard format for the client to consume | |
* and understand the error | |
*/ | |
import type { | |
ErrorRequestHandler, | |
Response, | |
Request, |
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
{ | |
"yachts": [ | |
{ | |
"id": 1, | |
"name": "YATE BIG TIME", | |
"pax": 8, | |
"ft": 46, | |
"model": "CRUISER EXPRESS", | |
"tripulation": "Capitán", | |
"priceList": [16000, 16500, 18000, 19500, 21000], |
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
{ | |
"products": [ | |
{ | |
"codigo": "13013B22", | |
"web": 2.254, | |
"publico": 1.61, | |
"medioMayoreo": 1.38, | |
"mayoreo": 1.15, | |
"distribuidor": 0.874, | |
"franquicia": 0.782, |