A boilerplate project for quickly setting up an Express.js application with common dependencies and useful scripts.
- Ready-to-use Express.js setup
- Logging using Morgan middleware
- Environment variable management with dotenv
- Automatic server restart during development using Nodemon
- Debugging support with Inspect
- Code formatting using Prettier
- Node.js (version 14.X.X or higher)
- npm (version 6.X.X or higher)
- Clone the repository:
git clone https://github.com/haiderRizvii/express-boilerplate.git
- Navigate to the project directory:
cd express-boilerplate
- Install the dependencies:
npm install
- Start the development server:
npm run dev
- Open your web browser and visit
http://localhost:5000to see the application in action.
npm run start: Starts the production server.npm run dev: Starts the development server using Nodemon for automatic restart on file changes.npm run dev debug: Starts the development server with debugging support using Inspect.npm run format: Formats the code using Prettier.
- Environment variables can be set in a
./config/config.envfile in the project root directory