npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-express-crud

v0.5.3

Published

A NPX tool that allows to the developer to deploy fast backend apps only passing a few arguments, like the port, url database or entity model in yaml format

Downloads

9

Readme

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:

  1. Create test folder
  2. Execute npm i generator-express-crud
  3. Execute npx express-crud
  4. 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:[email protected]: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

> [email protected] dev
> npm run generate && ./node_modules/nodemon/bin/nodemon.js


> [email protected] 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`

> [email protected] prestart
> npm run build


> [email protected] build
> npm run clean && tsc -p tsconfig-build.json


> [email protected] clean
> rm -rf dist


> [email protected] 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