@cilinder/generate-node-backend

1.3.12 • Public • Published

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).

Package Sidebar

Install

npm i @cilinder/generate-node-backend

Weekly Downloads

0

Version

1.3.12

License

MIT

Unpacked Size

47.7 kB

Total Files

26

Last publish

Collaborators

  • cilinder