# @cilinder/generate-node-backend

> Project to generate a backend nodejs project template

Latest version **1.3.12** (published 2024-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cilinder/generate-node-backend
pnpm add @cilinder/generate-node-backend
yarn add @cilinder/generate-node-backend
bun add @cilinder/generate-node-backend
```

Provides the command `gnb`.

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities; has provenance.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.12 |
| Published | 2024-10-07 |
| First published | 2022-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 46.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | cilinder |
| Maintainers | cilinder |
| Keywords | generate, nodejs, template |

## Links

- npm: https://www.npmjs.com/package/@cilinder/generate-node-backend
- Repository: https://github.com/cilinder/generate-node-backend
- Homepage: https://github.com/cilinder/generate-node-backend#readme
- Issues: https://github.com/cilinder/generate-node-backend/project/issues
- npm.io page: https://npm.io/package/@cilinder/generate-node-backend

## Dependencies (2)

- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [simple-git](https://npm.io/package/simple-git.md) ^3.27.0

## Recent versions

- 1.3.12 (latest) — 2024-10-07
- 1.3.11 — 2024-10-07
- 1.3.10 — 2024-10-07
- 1.3.9 — 2024-10-07
- 1.3.8 — 2024-10-07
- 1.3.7 — 2024-10-04
- 1.3.6 — 2024-10-04
- 1.3.5 — 2024-10-04
- 1.2.5 — 2022-12-06
- 1.2.4 — 2022-12-06
- 1.2.3 — 2022-11-15
- 1.2.2 — 2022-11-15
- 1.2.1 — 2022-11-15
- 1.2.0 — 2022-11-15
- 1.1.0 — 2022-11-11
- … 1 more at https://npm.io/package/@cilinder/generate-node-backend/versions

## README

# generate-node-backend
Simple Node.js program to generate a backend using Node.js, [Express](https://expressjs.com/), [Prisma](https://www.prisma.io/), [TSOA](https://tsoa-community.github.io/docs/).

## Usage

First install [Node.js](https://nodejs.org/en/)

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

---
_Source: https://npm.io/package/@cilinder/generate-node-backend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
