Skip to content

WillishakespeareSKR13/Template-Node-Fastify-Mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template Node Fastify MongoDB

A template project for building a Node.js API using Fastify and MongoDB, with user CRUD operations, JWT authentication, and other basic CRUD functionalities.

Table of Contents

Features

  • User CRUD operations (Create, Read, Update, Delete)
  • User registration and login with JWT authentication
  • MongoDB integration for data storage
  • API documentation with Swagger UI
  • CORS configuration for cross-origin requests

Prerequisites

  • Node.js v18.x
  • MongoDB instance (local or remote)
  • npm (Node Package Manager)

Getting Started

Installation

  1. Clone the repository:

    git clone https://github.com/WillishakespeareSKR13/Template-Node-Fastify-Mongo.git
    cd Template-Node-Fastify-Mongo
  2. Install dependencies:

    yarn install

Configuration

The application can be configured through the config.ts file in the root directory. Modify the configuration according to your needs:

  • APP: Configuration related to the application, such as port, host, environment, logger, and JWT secret.
  • DB: Database configuration, including MongoDB URI, host, port, and database name.

Running the Application

  • Start the application in development mode:

    yarn run dev
  • Build and run the application in production mode:

    yarn run build
    yarn start

API Documentation

API documentation is available using Swagger UI. Once the application is running, you can access the documentation at:

Live Demo

A live demo of the application is available at:

Documentation for the live demo is available at:

Dependencies

Dev Dependencies

License

This project is licensed under the MIT License. See the LICENSE file for details.

Feel free to use the code, and if you do, please give me credit.

Releases

No releases published

Packages

No packages published