Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 977 Bytes

README.md

File metadata and controls

39 lines (23 loc) · 977 Bytes

Example project using fastify and mongoose

The following project is an example/boilerplate using fastify and its plugin system to "inject" mongoose

This is a fastify RESTful application to run a local server and insert/view some data on mongo

Execute example

Using node

To execute the example you need to have node installed on your system

With the project source code on your pc, you can execute it by going to the root folder of the project and doing the following steps:

1. Install dependencies

To install the dependencies you need to execute the following command

npm i

2. .env

Create a .env file on the root folder with the following value

MONGODB_URI=mongodb://shop:password@localhost:27017/shop

3. Execute project

npm run dev

The application will be executed in http://localhost:3000 (and it will fail in case of having the port 3000 busy)