Giter Site home page Giter Site logo

todo-api's Introduction

ToDo API

This is a ToDo application API built using NestJS, and MongoDB. The application serves endpoints for managing tasks, users, and authentication. For protecting the endpoints, authentication is done with the help of short-living access-token, and long-living refresh-token. It also provides Swagger documentation for the API.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/bjspatel/todo-api.git
    cd todo-api
  2. Install the dependencies:

    npm install

Running the Application

  1. Make sure you have MongoDB running on local machine or on the free MongoDB Atlas cluster.

  2. Create a .env file in the root directory of the project and add the following environment variables (modify the values as needed):

    MONGODB_URI=mongodb://localhost:27017/todo
    FRONTEND_URL=http://localhost:5173
    PORT=8080
    • MONGODB_URI is the connection string for MongoDB.
    • FRONTEND_URL is used for CORS configuration.
    • PORT is the port on which the application will run.
  3. Start the application:

    npm run start
  4. The application will be running on http://localhost:8080.

API Documentation

The API is documented using the Swagger module. Once the application is running, you can access the Swagger documentation at http://localhost:8080/api.

Project Structure

TODO/
├── src/
│ ├── auth/ # Authentication module
│ ├── decorators/ # Custom decorators
│ ├── task/ # Task module
│ ├── user/ # User module
│ ├── app.module.ts # Root module
│ └── main.ts # Entry point
├── .env # Environment variables file
...

todo-api's People

Contributors

bjspatel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.