1.1.0 β€’ Published 7 months ago

express-ts-starter-cli v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Express TypeScript Starter CLI πŸš€

NPM Version

License

Downloads

A powerful and easy-to-use CLI tool to kickstart your Express.js + TypeScript + Mongoose(Default) projects in seconds. Save time and focus on building amazing features without worrying about the boilerplate!


✨ Features

  • TypeScript Support: Get started with a fully typed Express.js project.

  • Mongoose Integration: Built-in support for MongoDB with Mongoose models.

  • Customizable Templates: Generate projects tailored to your needs.

  • Zero Hassle: Pre-configured with best practices like eslint and prettier.

  • Scalable Structure: Designed for small to large projects.

  • Interactive CLI: Guides you through the setup with a beautiful and intuitive interface.


πŸš€ Installation

Install the CLI globally via npm:

npm  install  -g  express-ts-starter-cli

or

npx express-ts-starter-cli

πŸ› οΈ Usage

Run the following command to create a new project:

express-ts-starter

The CLI will guide you through the setup with options like:

  • Choosing a project name

  • Setting up environment variables


πŸ—‚οΈ Project Structure

The generated project will have the following structure:

my-express-project/

β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ app.ts
β”‚   β”œβ”€β”€ server.ts
β”‚ β”œβ”€β”€ middlewares/
| β”œβ”€β”€ controllers/
β”‚ β”œβ”€β”€ routes/
β”‚ β”œβ”€β”€ models/
β”‚ β”œβ”€β”€ helpers/
β”‚ β”œβ”€β”€ types/
β”‚ β”œβ”€β”€ utils/
β”œβ”€β”€ .prettierrc
β”œβ”€β”€ .eslint.config.mjs
β”œβ”€β”€ .env
β”œβ”€β”€ package.json
└── tsconfig.json

Key Features

  • Controllers: Keep your logic modular and organized.

  • Models: Keep your mongoose models here.

  • Helpers: Keep your helpers function here.

  • Routes: Define application endpoints cleanly.

  • Middleware: Add custom Express middlewares effortlessly.

  • Types: Keep your typescript types here.

  • Utils: Keep your utility functions here.


πŸ“¦ What’s Included?

When you use the CLI, you'll get:

  • TypeScript Config: Pre-configured tsconfig.json for seamless development.

  • Express Setup: Pre-configured expressjs .

  • Environment Management: .env file support for configuration.

  • Mongoose Models: Boilerplate for defining schemas and connecting to MongoDB.


🌟 Why Choose This Starter?

  • Time-Saving: Set up your project in seconds.

  • Best Practices: Industry-standard configurations for scalability and maintainability.

  • Community-Driven: Actively maintained and improved.

  • MongoDB Ready: Jumpstart your database integration with Mongoose.


πŸ§ͺ Example

To test if everything is working, run the development server:

npm run dev

Open http://localhost:3000 in your browser. You’ll see a welcoming API response!


🀝 Contributing

Contributions are welcome! Feel free to:

  • Open issues for feature requests or bugs.

  • Submit pull requests to improve the CLI.


πŸ“„ License

This project is licensed under the MIT License.


πŸ™‹ Support

If you encounter any issues or have questions, feel free to open an issue on GitHub.


Made with ❀️ by Shejan Mahamud.

1.1.0

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago