From c7832dce6728ec7c02ccf74b29ec66d8097c225c Mon Sep 17 00:00:00 2001 From: eksant Date: Sun, 4 Aug 2019 17:06:06 +0800 Subject: [PATCH] [DOCS] Update ReadMe --- README.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 84 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5504710..266e7c1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,28 @@ -# Global Express +

Global Express CLI

+ +

+ The official CLI of global-express +

+
+ +[![npm][npm]][npm-url] +[![Build Status][build-status]][build-status-url] +[![deps][deps]][deps-url] +[![Downloads][downloads]][downloads-url] +[![GitHub contributors][contributors]][contributors-url] +[![Issue resolution][issue-resolution]][issue-resolution-url] +[![GitHub][license]][license-url] + +## About A Command line interface for instantly building an express server. -Create models, graphql (resolvers and schema), rest-api (controllers, routes and services) and doc-api (swagger) in matter of seconds. +Global Express using different strategies : -## Installation +- Scaling on a single machine, the common concept is to have multiple processes running on the same port. +- Create models, graphql (resolvers and schema), rest-api (controllers, routes and services) and doc-api (swagger) in matter of seconds. +- Server configuration which includes port, host, http/https, page limit, rate limit suspend time and max hit per IP. + +## How to install Install it once globally: @@ -11,13 +30,52 @@ Install it once globally: $ npm install -g global-express ``` -## Getting Started +## Packages + +Global Express using multi-package repository like as: -### Initializing the application structure +- [Express](https://www.npmjs.com/package/express) +- [Body Parser](https://www.npmjs.com/package/body-parser) +- [Cors](https://www.npmjs.com/package/cors) +- [Debug](https://www.npmjs.com/package/debug) +- [Express Rate Limit](https://www.npmjs.com/package/express-rate-limit) +- [Helmet](https://www.npmjs.com/package/helmet) +- [Morgan](https://www.npmjs.com/package/morgan) +- [Multer](https://www.npmjs.com/package/multer) +- [Rest API](https://restfulapi.net/) +- [GraphQL](https://graphql.org/code/#javascript) +- [Apollo-Graphql](https://www.apollographql.com/docs/) +- [Swagger](https://swagger.io/) + +## Commands CLI ``` +# Output global express version +$ global-express -V or global-express --version + +# Output global exprer helper command +$ global-express -h or global-express --help + +# Initializes the global express with current or new directory +$ global-express init or global-express i + +# Initializes the global express with new directory +$ global-express init or global-express i + +# Delete directory the global express +$ global-express clean or global-express c +``` + +## Example Usage + +``` +# Make directory my-server $ mkdir my-server + +# Change directory to my-server $ cd my-server + +# Initializes the global express $ global-express init ``` @@ -45,13 +103,33 @@ my-server ### Install all the needed dependencies ``` -$ npm install +# Install all dependecies +$ npm install or yarn install ``` _Note: when running all of the further commands, please stay in the my-server directory_ +## Contributing and Internal Documentation + +The global express family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our [documentation on contributing](./.github/CONTRIBUTING.md). + ## Notes **Note:** The experience this CLI provides does not work as smooth in Git Bash terminal, since it is not an interactive terminal, but if you are using Git Bash inside VS Code, then there are no problems, I found no complications using any other terminal. Feel free to post issues if you run into any. + +[npm]: https://img.shields.io/npm/v/global-express.svg +[npm-url]: https://www.npmjs.com/package/global-express +[build-status]: https://circleci.com/gh/eksant/global-express/tree/master.svg?style=shield +[build-status-url]: https://circleci.com/gh/eksant/global-express/tree/master +[deps]: https://img.shields.io/david/eksant/global-express.svg +[deps-url]: https://img.shields.io/david/dev/eksant/global-express +[downloads]: https://img.shields.io/npm/dw/global-express.svg +[downloads-url]: https://www.npmjs.com/package/global-express +[contributors]: https://img.shields.io/github/contributors/eksant/global-express.svg +[contributors-url]: https://github.com/eksant/global-express/graphs/contributors +[issue-resolution]: https://isitmaintained.com/badge/resolution/eksant/global-express.svg +[issue-resolution-url]: https://github.com/eksant/global-express/issues +[license]: https://img.shields.io/github/license/eksant/global-express +[license-url]: https://img.shields.io/github/license/eksant/global-express