<commit_before><!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->

- [generator-node-crud-api](#generator-node-crud-api)
	- [Instalation](#instalation)
	- [CRUD APIs](#crud-apis)
		- [Create the project](#create-the-project)
		- [Create a model](#create-a-model)
		- [Run the server](#run-the-server)
		- [Creating not-CRUD endpoints](#creating-not-crud-endpoints)
	- [Domain APIs (not-CRUD)](#domain-apis-not-crud)
		- [Create the project](#create-the-project)
		- [Create an endpoint](#create-an-endpoint)
		- [Run the server](#run-the-server)
	- [Authentication](#authentitcation)
    - [Run the application with kong](#run-the-application-with-kong)
        - [Run the application locally](#run-the-application-locally)
        - [Kong administration](#kong-administration)
        - [Issuing a jwt](#issuing-a-jwt)
	- [Internal scripts](#internal-scripts)
		- [Domain APIs](#domain-apis)
		- [APIs with models](#api-with-models)

<!-- /TOC -->

# generator-node-crud-api
This is a `yeoman` generator for `REST` APIs with `swagger`. It can generate two types of APIs:

* APIs that has a `mongo` domain model with CRUD operations for this models, but also can have or not other `endpoints`.
* APIs with `endpoints` that are not bounded to a database model.

In this README we will call the first one "CRUD APIs" and the second one "Domain APIs".

## Instalation

```sh
$ npm install -g yeoman
$ npm install -g generator-node-crud-api
```

## CRUD APIs

For this APIs the generator will create the base structure of the project and make the `scaffolding` of the `mongoose` models, generating  the `REST endpoints` with the `CRUD` operations of this models.

### Create the project

The first step is to execute the `yeoman` generator to create the project. It will ask the name of the project, if our API will have `CRUD` models and if we want it to install the npm dependencies for us.
<commit_msg>Fixed two typos on toc<commit_after><!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->

- [generator-node-crud-api](#generator-node-crud-api)
	- [Instalation](#instalation)
	- [CRUD APIs](#crud-apis)
		- [Create the project](#create-the-project)
		- [Create a model](#create-a-model)
		- [Run the server](#run-the-server)
		- [Creating not-CRUD endpoints](#creating-not-crud-endpoints)
	- [Domain APIs (not-CRUD)](#domain-apis-not-crud)
		- [Create the project](#create-the-project)
		- [Create an endpoint](#create-an-endpoint)
		- [Run the server](#run-the-server)
	- [Authentication](#authentication)
    - [Run the application with kong](#run-the-application-with-kong)
        - [Run the application locally](#run-the-application-locally)
        - [Kong administration](#kong-administration)
        - [Issuing a jwt](#issuing-a-jwt)
	- [Internal scripts](#internal-scripts)
		- [Domain APIs](#domain-apis)
		- [APIs with models](#apis-with-models)

<!-- /TOC -->

# generator-node-crud-api
This is a `yeoman` generator for `REST` APIs with `swagger`. It can generate two types of APIs:

* APIs that has a `mongo` domain model with CRUD operations for this models, but also can have or not other `endpoints`.
* APIs with `endpoints` that are not bounded to a database model.

In this README we will call the first one "CRUD APIs" and the second one "Domain APIs".

## Instalation

```sh
$ npm install -g yeoman
$ npm install -g generator-node-crud-api
```

## CRUD APIs

For this APIs the generator will create the base structure of the project and make the `scaffolding` of the `mongoose` models, generating  the `REST endpoints` with the `CRUD` operations of this models.

### Create the project

The first step is to execute the `yeoman` generator to create the project. It will ask the name of the project, if our API will have `CRUD` models and if we want it to install the npm dependencies for us.

{'fraction_non_alphanumeric': 0.1269101269101269, 'fraction_numerical': 0.00259000259000259, 'mean_word_length': 3.919745222929936, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5023028', 'n_tokens_mistral': 1292, 'n_tokens_neox': 1190, 'n_words': 428}