Estudie los siguientes tutoriales:
- Express pages/getting started: installing
- hello world example
- Use EJS to Template Your Node Application
- express-ejs-layouts: Layout support for ejs in express.
- Basic routing tutorial
- Serving static files in Express
- Curso MOOC Node.JS: Introducción a express.js y al middleware static YouTube
-
Haga un clone de este repo: https://github.com/SYTW/hello-express
git clone git@github.com:SYTW/hello-express.git
-
Instala las dependencias con
npm install
-
Arranca el servidor con
npm test
-
Abre un navegador en http://localhost:8080 manualmente o bien con
npm run view
si estás en un mac -
Estos son los shell scripts usados para las dos paso anteriores (fragmento de
package.json
):"scripts": { "test": "node hello.js", "view": "open http://localhost:8080/" },