Skip to content

Instantly share code, notes, and snippets.

View dandelg88's full-sized avatar
馃捇
Learning

Dan Delgado dandelg88

馃捇
Learning
View GitHub Profile
@Klerith
Klerith / db.json
Created November 25, 2022 16:58
Json Data - Para nuestro backend de pruebas
{
"users": [
{
"id": 1,
"isActive": false,
"balance": 1397.32,
"avatar": "http://placehold.it/32x32",
"first_name": "Ryan",
"last_name": "Kent",
"gender": "male"
@Klerith
Klerith / tarea-pg-admin.md
Last active May 12, 2025 01:44
Tarea sobre PGAdmin y Postgres

Docker Hub images

Postgres

pgAdmin

1. Crear un volumen para almacenar la informaci贸n de la base de datos

docker COMANDO CREAR postgres-db

2. Montar la imagen de postgres as铆

OJO: No hay puerto publicado -p, lo que har谩 imposible acceder a la base de datos con TablePlus

@Klerith
Klerith / instalaciones-node.md
Last active May 3, 2025 22:34
Instalaciones recomendadas - Curso de Node de cero a experto
@Klerith
Klerith / app4.js
Last active October 11, 2024 22:04
Ejercicio de explicaci贸n del Event Loop y Node execution
console.log('Inicio de programa');
setTimeout( () => {
console.log('Primer Timeout');
}, 3000 );
setTimeout( () => {
@Klerith
Klerith / pasos-node-typescript.md
Last active May 12, 2025 09:57
Configurar proyecto de Node con TypeScript

Pasos para usar Node con TypeScript con Nodemon

M谩s informaci贸n - Docs Oficiales

  1. Instalar TypeScript y tipos de Node, como dependencia de desarrollo
npm i -D typescript @types/node
  1. Inicializar el archivo de configuraci贸n de TypeScript ( Se puede configurar al gusto)
@Klerith
Klerith / pasos-node-ts-jest.md
Created August 19, 2023 18:35
Note + TypeScript + Jest = Testing

Pasos para configurar Jest con TypeScript, en Node

Documentaci贸n oficial sobre Jest

  1. Instalaciones de desarrollo (super test es 煤til para probar Express)
npm install -D jest @types/jest ts-jest supertest
@Klerith
Klerith / configurar-node-ts.md
Last active May 12, 2025 14:59
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y dem谩s dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuraci贸n de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src
@Klerith
Klerith / self-certificates.sh
Last active March 22, 2025 14:50
Generar certificados
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt
@Klerith
Klerith / .env
Last active March 9, 2025 06:03
.env y docker compose para Postgres
PORT=3000
PUBLIC_PATH=public
POSTGRES_URL=postgresql://postgres:123456@localhost:5432/TODO
POSTGRES_USER=postgres
POSTGRES_DB=TODO
POSTGRES_PORT=5432
POSTGRES_PASSWORD=123456