Git Product home page Git Product logo

01-tasks-ignite's Introduction

A tasks API developed with pure Node.js

Status: Finished

AboutFeaturesAPI RoutesHow it worksTech StackAuthor

About

Tasks API - is the first challenge of the Node.js track of the Ignite course by @Rocketseat


Features

  • List tasks
  • Search tasks
  • Add tasks
  • Update tasks
  • Delete tasks
  • Mark task as completed
  • Importing tasks in bulk from a CSV file
  • Persist data in local database (JSON file: db.json)

API Routes

  • GET /tasks
    • Listing with or without filters of tasks depending on the existence of the query paramter: 'search' and its value
  • POST /TASKS
    • Task creation in the local database (db.json file), it is necessary: title and description only
  • PUT /tasks/:id
    • Update task according to the content of the request body, it is necessary: title and description only
  • DELETE /tasks/:id
    • Delete task according to ID passed as route parameter
  • PATCH /tasks/:id/completed
    • Mark task as completed

How it works

Pre-requisites

Before you begin, you will need to have the following tools installed on your machine: Git, Node.js. In addition, it is good to have an editor to work with the code like VSCode and a REST client like Insomnia

Run the app

# Clone this repository
$ git clone https://github.com/Artur-Poffo/01-Tasks-Ignite.git

# Access the project folder cmd/terminal
$ cd 01-Tasks-Ignite

# install the dependencies
$ npm install

# Run the application in development mode
$ npm run dev

# The server will start at port: 3333 - You can now test in Insomnia or another REST client: http://localhost:3333

And the CSV?

To load the CSV you must populate the CSV file in the path: ./streams/tasks.csv or replace it with a ready-made CSV file but with the same name: tasks.csv and while running the project as described above, run it in the root directory of project: node ./streams/csv-load.js, this way the content of the CSV will be converted into tasks and saved in the local database, remembering that the format of the content of your CSV file must follow the same pattern as the default file: tasks.csv


Tech Stack

The following tools were used in the construction of the project:

  • Node.js
  • Javascript
  • csv-parse

See the file package.json


Author

  • Artur Poffo - Developer

Linkedin Badge Gmail Badge


01-tasks-ignite's People

Contributors

artur-poffo avatar

Stargazers

Weslem Vitor 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.