0.0.1 • Published 5 years ago

global-express v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

npm Build Status deps Downloads GitHub contributors Issue resolution GitHub

About

A Command line interface for instantly building an express server.
Global Express using different strategies :

  • 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:

$ npm install -g global-express

Packages

Global Express using multi-package repository like as:

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 <directory> or global-express i <directory>

# Delete directory the global express
$ global-express clean <directory> or global-express c <directory>

Example Usage

# Make directory my-server
$ mkdir my-server

# Change directory to my-server
$ cd my-server

# Initializes the global express
$ global-express init

Directory structure

my-server
├── ...
├── apidoc                # Static HTML for API documentation
├── config                # Configuration database oracle dan doc api
├── docs                  # The screnshoot, doc api and json format import insomnia
├── grapqh                # Directory a query language for API
├   ├── resovers          # Containing files for the resolver
├   └── schema            # Schema models
├── logs                  # Log files
├── models                # Structure of tables and properties
├── restapi               # Directory a rest language for API
├   ├── controllers       # Containing class files for the controllers
├   ├── routes            # Containing routes API
├   └── services          # Containing class files for the service controllers
├── server                # Starter module express
└── utils                 # Files that are provided application

Install all the needed dependencies

# 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.

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.