Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/imevanc/fastify-typescript-mongo-starter
- Owner: imevanc
- License: mit
- Created: 2023-09-26T22:41:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-07T16:39:47.000Z (7 months ago)
- Last Synced: 2024-07-07T18:00:01.483Z (7 months ago)
- Topics: backend, fastify, mongodb, mongodb-atlas, mongoose, server, starter-project, typescript
- Language: TypeScript
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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
```