The Fastest Way to a Quick Starter App with Express.js

Over the years I’ve used Express.js many times as a quick getting started example app. Since I often reference it I wanted to provide a short post that shows exactly what I do 99.9% of the time to start one of these quick Express.js reference apps. I’ve detailed in this post how to get started with Express.js the fastest way I know. There is one prerequisite, I’m assuming in this post you’ve already got Node.js installed. With that in mind, check out my installation suggestions for Node.js if you need to get that installed still. The other thing, is you’ll need to have git installed. On MacOS and Linux git is most likely installed already, if you’re on Windows I’ll leave that googling exercise up to you.

Create a directory and navigate into the directory.

mkdir quick-start-express
cd quick-start-express

Now in that directory execute the following command. Note, this command is available as of node.js 8.2.0.

npx express-generator
npm install

Inside that directory that you’ve navigated to, you’ll now have an Express.js skeleton app setup to run with the dependencies now downloaded with npm install. On MacOS or Linux run the following command to start the web app.

DEBUG=quick-start-express:* npm start

If you’re on Windows run the following command.

set DEBUG=quick-start-express:* & npm start

That’s it, one of the quickest ways to get a Node.js site up and running to start developing against!

Cheers, and happy thrashing code!

--

--

--

Software dev, data, heavy metal, transit, economics, freethought, atheism, cycling, livability, beautiful things & adrenaline junkie.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Mongoose Data Schema with Node.js

Testing Non-Exported Functions in JavaScript

Music Visualization Aggregation: Technology + Standards

http://keeponkeepingon.live/2021/02/07/there-is-chaos-all-around-us-and-there-is-chaos-inside-of-all

Deploy a static website with AWS Cloud Development Kit (CDK)

How a YouTube Video Can Destroy Your Site Performance and How to Fix It

Reusable Modular Components: The Higher-Order

WebAssembly Microfrontends

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adron Hall

Adron Hall

Software dev, data, heavy metal, transit, economics, freethought, atheism, cycling, livability, beautiful things & adrenaline junkie.

More from Medium

Setting up a node project in typescript from Scratch

Companies That Use Node.js. How Do Big Players Benefit from It in 2022?

My thoughts on Sublime vs. Visual Studio Code for Javascript/NodeJS projects

What is TypeScript and why would I use it in place of JavaScript?