DEV Community

Cover image for Day 5
Brix Mavu
Brix Mavu

Posted on

2 1

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"

Heroku

Amplify your impact where it matters most — building exceptional apps.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

Image of DataStax

Langflow: Simplify AI Agent Building

Langflow is the easiest way to build and deploy AI-powered agents. Try it out for yourself and see why.

Get started for free

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay