DEV Community

Cover image for Day 5
Brix Mavu
Brix Mavu

Posted on

Day 5

Make use of templating engine - I will use Handlebars

Introduce a generated base for quick development - express-generator

Reason for express generator we can't always built things from scratch the plan is to start from a base.

In terminal run

npx express-generator --view=hbs --git day5

cd day5

npm i

If problems arise just run:

npm audit --force

Start server

npm start

You can check the command in package.json

When server is running open browser and open :

localhost:3000

From day4 prject copy authenticate folder and files inside public folder

style.css will be replace the one in /public/stylesheets

script.js goes inside /public/javascripts

add script tag inside /views/layouts.hbs file

Inside /views/index.hbs file add html forms from day4/index.html

Inside /views/index.hbs login form tag change action tag must be action="users/login"

Top comments (0)