0.5.3 • Published 2 years ago
generator-express-crud v0.5.3
generator-express-crud
A NPX tool that allows to the developer to deploy fast TypeScript backend apps only passing a few arguments:
- Backend port
- Mongo URL Database || Docker Mongo Database
- Entity model in YAML format
Stack
- ExpressJS
- Swagger
- Typescript 4
- Tsoa
- Mongoose
- Docker
Installation and execution example
Steps to reproduce:
- Create test folder
- Execute
npm i generator-express-crud
- Execute
npx express-crud
- Generate Swagger API documentation and running it by execution
npm run dev
-@Mac-Mini-M1 testFolder % npm i generator-express-crud
up to date, audited 454 packages in 670ms
51 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-@Mac-Mini-M1 testFolder % npx express-crud
_-----_
| |
|--(o)--| ╭──────────────────────────╮
`---------´ │ generator-express-crud │
( _´U`_ ) ╰──────────────────────────╯
/___A___\ /
| ~ |
__'.___.'__
´ ` |° ´ Y `
? Insert you model .yaml filename that contains your data model business: model.yaml
? Insert the port where you want to startup your app: 8080
? Insert your URL MongoDB database: mongodb://mongo:dBIuBRCsFztpbBLdGpX5@containers-us-west-67.railway.app:6754
Documentation API Generated via Swagger
You can check it by executing 'npm run dev' and checking http://localhost:8080/docs
conflict package.json
? Overwrite package.json? overwrite
force package.json
create src/database.ts
create tsconfig.json
create tsconfig-build.json
create tsoa.json
create nodemon.json
create src/ioc/ioc.ts
create src/dao/repository/AlumnoRepository.ts
Changes to package.json were detected.
Running npm install for you to install the required dependencies.
create src/interfaces/dao/IAlumnoDao.ts
create src/dao/AlumnoDaoImpl.ts
create src/models/entities/Alumno.ts
create src/interfaces/service/IAlumnoService.ts
create src/service/AlumnoServiceImpl.ts
create src/controllers/Alumno/AlumnoController.ts
create src/dao/repository/ProfesorRepository.ts
create src/interfaces/dao/IProfesorDao.ts
create src/dao/ProfesorDaoImpl.ts
create src/models/entities/Profesor.ts
create src/interfaces/service/IProfesorService.ts
create src/service/ProfesorServiceImpl.ts
create src/controllers/Profesor/ProfesorController.ts
create src/common/exception/DaoError.ts
create src/common/exception/ServiceError.ts
create src/index.ts
added 604 packages, removed 328 packages, and audited 730 packages in 41s
101 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-@Mac-Mini-M1 testFolder % npm run dev
> backend@1.0.0 dev
> npm run generate && ./node_modules/nodemon/bin/nodemon.js
> backend@1.0.0 generate
> tsoa routes && tsoa swagger
[nodemon] 2.0.19
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): src/**/*
[nodemon] watching extensions: ts
[nodemon] starting `npm start`
> backend@1.0.0 prestart
> npm run build
> backend@1.0.0 build
> npm run clean && tsc -p tsconfig-build.json
> backend@1.0.0 clean
> rm -rf dist
> backend@1.0.0 start
> node ./dist
connecting to database
connected to database
Server started at http://localhost:8080
Example entity model in YAML format
Alumno:
nombre: String
apellidos: String
edad: Number
nota: Number
Profesor:
nombre: String
apellidos: String
edad: Number
NPM Package
You can check this package too in NPMJS
0.5.3
2 years ago
0.5.1
2 years ago
0.4.9
2 years ago
0.4.8
2 years ago
0.4.10
2 years ago
0.5.0
2 years ago
0.4.7
2 years ago
0.4.6
2 years ago
0.4.5
2 years ago
0.4.4
2 years ago
0.4.3
2 years ago
0.4.2
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.3.10
2 years ago
0.3.9
2 years ago
0.3.8
2 years ago
0.3.7
2 years ago
0.3.6
2 years ago
0.3.5
2 years ago
0.3.4
2 years ago
0.3.3
2 years ago
0.3.2
2 years ago
0.3.1
2 years ago
0.3.0
2 years ago
0.2.0
2 years ago
0.1.10
2 years ago
0.1.9
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago
0.0.0
2 years ago