Giter Site home page Giter Site logo

task_ninja_backend's Introduction

Task Ninja Backend

Task Ninja is a simple todo application backend built using Go (Golang), Gorilla Mux, and MongoDB.

Features

  • Create, read, update, and delete tasks
  • Store tasks in a MongoDB database
  • RESTful API endpoints for simple task management

Prerequisites

Before you begin, ensure you have the following installed:

  • Go (Golang): Make sure you have Go installed on your system. You can download it from the official website: Go Downloads

  • MongoDB: You'll need a running MongoDB server. You can install it locally or use a cloud-based service.

  • Gorilla Mux: We'll use Gorilla Mux for routing. Install it using:

    go get -u github.com/gorilla/mux
    
  • MongoDB Go driver: We'll use the official MongoDB Go driver. Install it using:

    go get go.mongodb.org/mongo-driver
    

Installation

  1. Clone the repository:

    git clone https://github.com/priyanshupatra02/task_ninja_backend.git
    cd task_ninja_backend
  2. Set up your environment variables .env:

    
    const (
        dbHost     = "<your-host-url-copied-from-mongoDB"
        dbName     = "<as-set-in-your-mongoDB"
        collection = "<as-set-in-your-mongoDB>"
    )
    
  3. Build and run the server:

    go build .
    go run main.go

API Endpoints

  • GET /api/getAllTasks: Get all tasks
  • POST /api/task: Create a new task
  • PUT /api/task/{id}: Mark an existing task as completed
  • PUT /api/undoTask/{id}: Undo a task
  • DELETE /api/deleteTask/{id}: Delete a task
  • DELETE /api/deleteAllTasks: Delete all tasks

Usage

Use a tool like curl or Postman to interact with the API endpoints.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

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


Feel free to customize this README according to your project's specifics. Happy coding! ๐Ÿš€

task_ninja_backend's People

Contributors

priyanshupatra02 avatar

Watchers

 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.