DEV Community

Yogeswari Narayasamy
Yogeswari Narayasamy

Posted on

3 1

How To Quickly Generate An Express App Skeleton And Then Edit It

  • First you must install the express-generator by typing:
    npm install -g express-generator

  • Next run the following command to create an express app with the ejs engine:
    express --view=ejs kikucare
    kikucare is the name of the app we're creating.

Alt Text

  • Go into the newly created app folder by typing:
    cd kikucare/

  • Install all dependencies by typing:
    npm install

  • Next start the app by typing the command:
    DEBUG=kikucare:* npm start

  • You can now view the app on the browser by going to the address http://localhost:3000/.

  • You'll see the following:
    Alt Text

Let's make a simple change to what's displayed on the browser!

  • We'll edit the file index.js from the folder routes.
    Alt Text

  • Modify line number 6 by replacing the title from 'Express' to 'Kikucare'
    Alt Text

  • Output:
    Alt Text

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay