xpresso v2.0.3
XPRESSO
An express typescript generator to quickly develop REST API's
Installation
$ npm install -g xpressoQuick Start
Install the cli tool
$ npm install -g xpressoNavigate to the directory you wish to create the project in, and run the init command, followed by the project name. A new folder will be created that follows the name you provide:
$ cd projects && xpresso init comicsNavigate into the newly created directory and create a CRUD route with the route command:
$ cd comics && xpresso route comicNext, create a comic model with the model command:
$ xpresso model comicBuild the project with the npm command:
$ npm run buildStart the server:
$ npm startUse any REST client to test out the generated API
Features
- Generates typescript project
- JWT authentication
- Dynamic route creation
- Custom logger with context id
- Request logging with context id
- Tests with Jest
Usage
commands
Base commands available from the CLI
$ xpresso
init [options] [name]
model [name]
route [options] [name]init
Generates a new xpresso project
$ xpresso init [options] [name]
-r, --repo [repo] specify repository for the project
-s, --summary [summary] set the summary of the project
--no-auth disables jwt authenticationroute
Generates a new model
$ xpresso route [options] [name]
-w, --websocket add a websocket handler
--no-auth disables jwt authentication for this route
--no-spec disables spec file generation for this routemodel
Generates a new model
$ xpresso model [name]Todo
- Option to disable database
3 years ago
4 years ago
4 years ago
4 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago