npm.io
1.3.12 • Published 1 year agoCLI

@cilinder/generate-node-backend

Licence
MIT
Version
1.3.12
Deps
2
Size
47 kB
Vulns
0
Weekly
0

generate-node-backend

Simple Node.js program to generate a backend using Node.js, Express, Prisma, TSOA.

Usage

First install Node.js

Initialize package.json

npm init

After answering the questions, install the package

npm install @cilinder/generate-node-backend --save-dev

Initialize the project

npx gnb init

Create a test route

npx gnb generate-test-route

Generate an API route and all the associated code

npx gnb generate-route <name of the controller generated> <the route for the API> <"Get" or "Post">

You can use the dry-run option with any command to see the files it would generate without writing anything to disk.

Generate a test route and view the Swagger GUI

Generate the test route

npx gnb generate-test-route

Start the backend

npm run dev

The project is available at localhost:$PORT/docs, where $PORT can be found in .env (the port is generated randomly for each new instance).

Keywords