Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cornayy/ts-api-boilerplate

A great starting point for a TypeScript REST API using Mongoose.
https://github.com/cornayy/ts-api-boilerplate

api boilerplate mongoose rest rest-api typescript

Last synced: 10 days ago
JSON representation

A great starting point for a TypeScript REST API using Mongoose.

Awesome Lists containing this project

README

        

# ts-api-boilerplate

## About

A great starting point for a TypeScript REST API using Mongoose.

### Included

* Seeds
* Routes
* Controllers
* Services
* Models
* Database
* Tests (Mocha, Chai, Supertest & Istanbul for Code Coverage)
* Swagger
* JWT Authentication

## Usage

```
npm install
```

### .env

Rename the `.env.example` file to `.env` and fill in the variables.

```
PORT=3000
MONGO_URI=MONGOSERVER
MONGO_DB=DATABASENAME
TOKEN_SECRET=YOURJWTSECRET
```

### Commands

Development
```
npm run dev
```

Build
```
npm run build
```

Test
```
npm test
```