Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pstevovski/express-app-cli
CLI application for generating NodeJS / Express projects
https://github.com/pstevovski/express-app-cli
cli express javascript nodejs typescript
Last synced: 9 days ago
JSON representation
CLI application for generating NodeJS / Express projects
- Host: GitHub
- URL: https://github.com/pstevovski/express-app-cli
- Owner: pstevovski
- Created: 2020-10-24T12:17:26.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-26T23:32:16.000Z (almost 4 years ago)
- Last Synced: 2024-09-08T15:46:43.380Z (2 months ago)
- Topics: cli, express, javascript, nodejs, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/express-app-cli
- Size: 783 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Express App CLI
**express-app-cli** is an application that bootstraps your NodeJS / Express projects fast and easy.
## Installing and Using the CLI
To use the CLI, you'll need to install it globally trough **npm**:
> npm install -g express-app-cliOr you can use **yarn** aswell:
> yarn global add express-app-cliThen you can use by running:
> express-app < project-directory > [options]## Overview :eyes:
This CLI accepts multiple options used for configuring the project, such as:
- language template
- database
- testing library
- ORM (if using a SQL-based database. If using MongoDB, then Mongoose is automatically installed)
- templating engineIt handles installing the pre-defined and specified packages, creating a project structure and initializing Git, so all you have to do is just run `npm run watch` which will start your server (by default its on `PORT 3000`) and watch for any file changes that will trigger server restart, and you're good to go.
If no arguments are provided, then the user will be asked a series of questions on how to configure the project.
### Options :clipboard:
The list of options include:
--default -> Creates a project with: Javascript, MongoDB & Jest
# Languages
--javascript -> selects Javascript as a language
--typescript -> selects Typescript as a language# Databases
--mongodb -> selects MongoDB database (& Mongoose)
--postgres -> selects Postgres database
--mysql -> selects MySQL database
--sqlite -> selects SQLite database# Testing Libraries
--jest -> Selects Jest testing library
--chai -> Selects Chai testing library
--mocha -> Selects Mocha testing library# ORMs for SQL-based databases
--sequelize -> Selects Sequelize ORM
--typeorm -> Selects TypeORM# Templating Engines
--handlebars -> Selects Handlebars templating engine
--ejs -> Selects EJS templating engine
--pug -> Selects Pug templating engine# Misc
--version -> Provides the version of the application
--help -> Provides the information regarding the application### Example :computer:
A quick example demonstrating the usage of the CLI:
# Make a directory where you would like to create the project
mkdir example# Create the project with the default configuration in the 'example' folder
express-app example\ --default# Change your current directory to the project's directory
cd example\# Start and watch the server for any changes
npm run watch## Planned Features
Features that are planned to be added in a future update, as additional **optional** configuration properties:
- Setup for Heroku deployment
- Basic user authentication and authorization using JWT
- Support for PrismaORM## Contribution :construction_worker:
If you have any recommendations for what can be improved or added to the CLI, please feel free to open a pull request.When creating a new branch please follow the `feature/branch-name` convention if it's a feature to be added or updated. Or if its related to fixing a bug `bugfix/branch-name` convention. All pull requests then will be directed towards the `develop` branch.
If you find any bugs, please open an issue.