Skip to content

Instantly share code, notes, and snippets.

View Lostovayne's full-sized avatar
:octocat:
Buenas!

Deus lo Vult Lostovayne

:octocat:
Buenas!
View GitHub Profile
@Lostovayne
Lostovayne / docker-compose.yml
Last active February 14, 2024 20:59
Archivo de docker para imagenes de base de datos
version: '3.8'
services:
mongo-db:
image: mongo:6.0.6
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASS}
volumes:
@Lostovayne
Lostovayne / _redirects
Last active December 25, 2023 02:52
Solucion para desplegar la web en Netlify solo crear el archivo con ese nombre y ese codigo dentro y listo
/* /index.html 200
@Lostovayne
Lostovayne / vite-testing-config.md
Last active September 21, 2024 22:30
Vite + Jest + React Testing Library - Configuraciones a seguir

Instalación y configuracion de Jest + React Testing Library

En proyectos de React + Vite

  1. Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react 
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
  1. Opcional: Si usamos Fetch API en el proyecto:

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
@Lostovayne
Lostovayne / vercel.json
Last active May 11, 2024 20:43
Configuracion de una spa con react en vercel usando este archivo , escoger una de las 2 versiones que estan abajo, el archivo debe tener el nombre definido ahi
//probar una de las 2
{
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" } ]
}