Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/imevanc/fastify-typescript-mongo-starter

This is a Fastify with Mongo starter project in TypeScript.
https://github.com/imevanc/fastify-typescript-mongo-starter

backend fastify mongodb mongodb-atlas mongoose server starter-project typescript

Last synced: 7 days ago
JSON representation

This is a Fastify with Mongo starter project in TypeScript.

Awesome Lists containing this project

README

        

# Fastify with Mongo in TypeScript

This is a fastify with mongo starter project in typescript.



The projects follows the plugins & controllers/models architecture. You can find two plugin in the plugins folder. The buildFastifyEnvPlugin links the .env file to the fastify server and the connectToDbPlugin connects the server to your Mongo Atlas Cluster.

## Installation

```bash
$ git clone https://github.com/imevanc/fastify-typescript-mongo-starter.git
$ cd fastify-typescript-mongo-starter
$ npm run install
```

## Development

You need to create a .env file in the root of your project and populate it with the following entries.

```bash
NODE_ENV=
MONGO_URL=
MONGO_DB_NAME=
MONGO_COLLECTION_NAME=
HTTP_PORT=
HTTP_HOST=
```

You can run the project with hot reload.

```bash
$ npm run dev
```