DEV Community

Cover image for Creating & Running Expressjs Projects With create-express-app
Yasser Ameur el idrissi
Yasser Ameur el idrissi

Posted on

3 1

Creating & Running Expressjs Projects With create-express-app

Create Express App is a command-line interface tool that helps you to initialize, develop and maintain your Expressjs applications. It offers a modern build setup with no configuration. At the same time, it still offers the flexibility to tweak the config of each tool.
Starting new Express projects used to be a huge hassle — there were dozens of dependencies, configuration files, and other up front requirements before you could even start writing a single line of code.
Install it on your machine
You’ll need to have Node >= 8.10 on your local development machine Installation is done using the npm install command:

npm install -g create-expressjs-app

It’s really simple to create a new app — simply run create-expressjs-app followed by the desired name of your application, and it will scaffold a new app for you. Lets try it out:

create-expressjs-app init my-app

The folder my-app was created by create-express-app and houses all of our new application's code. The project layout should look like this:

├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│   ├── favicon.ico
│   ├── index.html
|   ├── logo64.png
|   ├── logo128.png
│   └── logo256.png
└── src
    ├── App.js
    └── App.test.js
Enter fullscreen mode Exit fullscreen mode

Building & running an application
npm start
Runs the app in development mode. Open http://localhost:3000 to view it in the browser.
npm build
Convert TypeScript or ECMAScript 2015+ code into a backwards compatible version of JavaScript
npm test
Runs the test watcher in an interactive mode.
We encourage you to contribute to create-expressjs-app!
GitHub
Happy Coding !

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay