ks-be-cli
v0.1.3
Published
CLI tool to create backend projects with Express
Readme
ks-be-cli
ks-be-cli is a command-line tool that helps to create backend projects with Express.js configuration. It supports optional MongoDB integration and includes built-in configurations for logging, security, and data compression.
Features
- Express server with basic routing and middleware
- MongoDB integration (optional)
- Logging with Winston and Morgan
- Security with Helmet
- Data compression with Compression
- Body parser for handling large JSON payloads
- Customizable port via environment variables
Setup
1. Clone the repository:
git clone https://github.com/yourusername/ks-be-cli.git2. Install dependencies:
npm install3. Create a new project:
You can create a new backend project by running the following command:
npx ks-be-cli create my-backend-project4. Set up your .env file for environment variables:
PORT=8080(default port)- MongoDB settings if using MongoDB
5. Run the application:
npm start6. Optionally, use npm run dev to start the server with nodemon for automatic restarts.
License
This project is licensed under the MIT License - see the LICENSE file for details.
