Last active
July 10, 2024 04:45
-
-
Save jorarmarfin/ddd14a077295201dc9781b1772fd2ec3 to your computer and use it in GitHub Desktop.
Iniciar un proyecto de node
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
#!/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