expresscraft
v1.3.2
Published
A simple CLI to generate an Express.js project with dependencies
Downloads
13
Maintainers
Readme
ExpressCraft is a command-line tool that allows you to quickly generate an Express application scaffold, getting you up and running with a basic Express server structure in no time.
Installation
To use ExpressCraft, make sure you have Node.js and npm installed on your system. Then, you can install it globally using npm:
npm install -g expresscraft
Usage
To generate a new Express application, simply run the following command:
npx expresscraft
This will prompt you to enter the name of your application, and then generate a new directory with the specified name containing the Express application scaffold.
Features
You can use ExpressCraft to generate a new Express application with the following features:
- Choose the name of your application
- Choose the description of your application
- Choose the author of your application
- Choose the Modules and Frameworks you want to use in your application
Modules and Frameworks
ExpressCraft supports the following modules and frameworks:
Package Manager
| Package Manager | Description | | --------------- | ----------- | || NPM is the default package manager for the JavaScript runtime environment Node.js.| || Yarn is a package manager for your code. It allows you to use and share code with other developers from around the world.|
Language
| Language | Description | | -------- | ----------- | || JavaScript is a programming language that conforms to the ECMAScript specification.| || TypeScript is a superset of JavaScript that compiles to plain JavaScript.|
Version Control
| Version Control | Description | | --------------- | ----------- | || Git is a distributed version control system for tracking changes in source code during software development.| || Apache Subversion is a software versioning and revision control system distributed as open source under the Apache License.|
Template Engine
| Template Engine | Description | | --------------- | ----------- | || EJS is a simple templating language that lets you generate HTML markup with plain JavaScript.| || Pug is a high-performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers.| || Twig is a modern template engine for PHP.| || Handlebars provides the power necessary to let you build semantic templates effectively with no frustration.|
CSS Framework
| CSS Framework | Description | | ------------- | ----------- | || Tailwind CSS is a utility-first CSS framework for rapidly building custom designs.| || Bootstrap is an open-source front-end framework for developing websites and web applications.| || Bulma is a free, open-source CSS framework based on Flexbox and used by more than 200,000 developers.| || Foundation is a family of responsive front-end frameworks that make it easy to design beautiful responsive websites, apps, and emails.| || Materialize is a modern responsive front-end framework based on Material Design.| || Semantic is a development framework that helps create beautiful, responsive layouts using human-friendly HTML.|
Database
| Database | Description | | -------- | ----------- | || MySQL is an open-source relational database management system.| || PostgreSQL is a powerful, open-source object-relational database system.| || SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine.| || MongoDB is a general-purpose, document-based, distributed database built for modern application developers and for the cloud era.|
ORM
| ORM | Description | | --- | ----------- | || Prisma is an open-source database toolkit. It replaces traditional ORMs and makes database access easy with an auto-generated query builder for TypeScript & Node.js.| || Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite, and Microsoft SQL Server.| || TypeORM is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be used with TypeScript and JavaScript.| || Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.| || Drizzle is a lightweight, fast, and simple ORM for Node.js, built on top of Knex.|
Testing
| Testing | Description | | ------- | ----------- | || Jest is a delightful JavaScript Testing Framework with a focus on simplicity.| | | Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun.| || Jasmine is a behavior-driven development framework for testing JavaScript code.|
Authentication
| Authentication | Description | | -------------- | ----------- | || Passport is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped into any Express-based web application.| || JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties.|
Linting
| Linting | Description | | ------- | ----------- | || ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.| || TSLint has been deprecated in favor of ESLint.|
API Documentation
| API Documentation | Description | | ----------------- | ----------- | || Swagger is a set of open-source tools built around the OpenAPI Specification that can help you design, build, document, and consume REST APIs.| || Postman is a collaboration platform for API development.|
Getting Started
After Installing ExpressCraft, you can create a new Express application by running the following command:
npx expresscraft
This will prompt you to enter the name of your application, and then generate a new directory with the specified name containing the Express application scaffold.
Once the application has been generated, you can navigate to the new directory and start the server by running:
_____ ____ __ _
| ____|_ ___ __ _ __ ___ ___ ___ / ___|_ __ __ _ / _| |_
| _| \ \/ / '_ \| '__/ _ \/ __/ __| | | '__/ _` | |_| __|
| |___ > <| |_) | | | __/\__ \__ \ |___| | | (_| | _| |_
|_____/_/\_\ .__/|_| \___||___/___/\____|_| \__,_|_| \__|
|_|
✨ Welcome to Express Generator CLI tool.✨
🎯 Version: 1.4.0
🎗️ Author: @Ravikisha
This tool will help you to generate a new project with a template in Express js with all the necessary files, folders 📁 and dependencies 🗃️.
🕑 Let's get started by asking some questions to setup your project 🚀
? What is your project name? Ecommerce
? What is your project description?(optional) Ecommerce Application for NetFlix
? What is your project author?(optional) Ravi Kishan
? What is your project Package Manager? NPM
? What is your project language? TypeScript
? What is your project Version Control? Git
? What is your project template engine? EJS
? What is your project CSS Framework? Tailwind CSS
? What is your project database? PostgreSQL
? What is your project ORM? Prisma
? What is your project testing? Jest
? What is your project authentication? Passport.js
? What is your project linting? TSLint
? What is your project API Documentation? Swagger
✅ Generating Project....
✅ Folder created successfully.
✅ Project created successfully.
✅ Setup Details in Project.
✅ Git initialized successfully.
✅ EJS initialized successfully.
✅ Tailwind CSS initialized successfully.
🔔 Run the following command to generate the database schema:
---------------------------
npx prisma generate
---------------------------
✅ Database and ORM setup complete.
Jest configuration written to "C:\Users\ravi\Desktop\ExpressCraft\Ecommerce\jest.config.js".
✅ Jest installed successfully
npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
✅ TSLint installed successfully
✅ Swagger installed successfully
💗 Thanks for using ExpressCraft .....
🚀 Your project is ready!
👉 Get started with the following commands:
👍 Run Your Project:
1️⃣ Open your terminal
2️⃣ Go to your project directory
-----------------------------------
cd Ecommerce
-----------------------------------
3️⃣ Run the following command
------------ 💻 Dev Mode --------------
npm run dev
------------ 📈 Production Mode --------------
npm start
-----------------------------------
😎 Happy Coding! 🎉
🌟 If you like ExpressCraft, give us a star on GitHub
This prompt will ask you a series of questions to set up your project. Once you have answered all the questions, the project will be generated with the specified configuration.
You can then navigate to the new directory and start the server by running:
cd Ecommerce
npm run dev
This will start the server in development mode, and you can access it by navigating to http://localhost:3000
in your web browser.
Author
This project is created and maintained by Ravi Kishan.
Changelog
Check out the CHANGELOG for the latest updates and changes to the project.
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.