Curso para aprender Node.js desde cero.
- Clase 1: Introducción a Node.js y módulos
- Clase 2: Desarrollando una API con Express desde cero
- Clase 3: SOLUCIÓN de CORS y Desarrollo de API REST con Express
- Clase 4: EL PODER de la ARQUITECTURA MVC + Despliegue de API REST
- Clase 5: Crea un Base de Datos MySQL y evita los hackers
- Clase 6: Chat en TIEMPO REAL con Node.js, Socket.io, SQL, HTML y CSS
Use fnm as version manager
-
List installed Node.js versions
fnm ls
-
Install a new Node.js version, e.g. install Node v18:
fnm install 18
-
Change Node.js version
fnm use 18
For more information see fnm docs.
-
Install Standard
npm install standard -D
-
Add to
packages.json
"eslintConfig": { "extends": "standard" }
-
Install ESLint extension
-
Add to
settings.json
"[javascript]": { "editor.formatOnSave": true }, "editor.codeActionsOnSave": { "source.fixAll.eslint": true }
-
Additionally, to highlight errors install Error Lens extension
Note: To avoid invasive error messages, add
"errorLens.followCursor": "activeLine"
tosettings.json
to display the error only on the active line.
-
Install nodemon
npm install nodemon -D
-
Add to
packages.json
"scripts": { "dev": "nodemon [your_js_file_name.js]" }
Disable (and then reenable) strict mode to install npm packages:
npm set strict-ssl false
Clase 6