Skip to content

Instantly share code, notes, and snippets.

@jorarmarfin
Last active July 10, 2024 04:45
Show Gist options
  • Save jorarmarfin/ddd14a077295201dc9781b1772fd2ec3 to your computer and use it in GitHub Desktop.
Save jorarmarfin/ddd14a077295201dc9781b1772fd2ec3 to your computer and use it in GitHub Desktop.
Iniciar un proyecto de node
#!/bin/bash
# Inicializar el proyecto Node.js
npm init -y
# Crear el archivo index.js
touch index.js
# Instalar las dependencias necesarias
npm install express dotenv express-validator mongoose bcrypt jsonwebtoken cors mysql2
# Crear las carpetas necesarias
mkdir -p controllers database helpers middleware models public requests routes
echo "Proyecto Node.js inicializado y configurado correctamente."
# npm i nodemon -g #Esto solo una vez en el servidor
#{
# "name": "backend-lr",
# "version": "1.0.0",
# "main": "index.js",
# "scripts": {
# "dev": "nodemon index.js",
# "test": "echo \"Error: no test specified\" && exit 1"
# },
# "keywords": [],
# "author": "",
# "license": "ISC",
# "description": ""
#
#}
# npm star o npm run dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment