this is a generator to make Express app
with custom REST API defined in Json Schema and Open Api
- generate simple express.js server.
- generate custom REST API.
- API Validator by express-validator
- generate OpenApi
- Swagger UI Express
- OAuth by Passport.js
- Database Driver
- MongoDB by Mongoose
express.js is a simple & flexible framework to build a web app, it provide balanced performance,
as this is open-source project, i want lower the technical barrier to contribute ideas,
eventually lead to a usefull and powerful framework.
-
install package globally.
npm i -g very-express
-
use cli to initialize configuration file vex.config.json under your project root directory.
vex -init
-
create a empty directory and name it as value of vex.config's "jsonSchemaDir", by default
jsonSchema
.
mkdir jsonSchema
. -
you can create your db collection/table now in directory
./jsonSchema
just created,
refer to Define Json Schmea, every changes require to regenerate app. -
generate the app with vex.config param.
vex
-
you should saw a express typescript app being generated (with src, package.json etc) .
├── jsonSchema/ │ └── ... ├── src/ │ └── ... ├── package.json ├── tsconfig.json ├── vex.config.json └── .env
-
start the generated express app.
npm i npm build npm run start