Skip to content

samirelhassann/assignment-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Crud

A CRUD task api built using native NodeJs

This is a project used for study purposes only • Samir El Hassan

This project was built with the help of the Rocketseat image 3

Language and Tools

nodejs javascript

Additional Libraries

  • csv-parse

Instalation

npm install

Usage

To start the API, run on root folder:

node --watch src/server.js

To execute the upload batch, run on another terminal in root folder while the API is running:

node batch/import-csv-batch.js

Example cUrls

  1. POST /tasks
curl --location --request POST 'http://localhost:3333/tasks' \
--header 'Content-Type: application/json' \
--data-raw '{
    "title": "task 1",
    "description": "Task description"
}'
  1. GET /tasks
curl --location --request GET 'http://localhost:3333/tasks'
  1. PUT /tasks/{task_id}
curl --location -g --request PUT 'http://localhost:3333/tasks/{task_id}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "title": "Altered title",
    "description": "Task description"
}'
  1. PATCH /tasks/{task_id}/complete
curl --location --request PATCH 'http://localhost:3333/tasks/{task_id}/complete'

About

A CRUD task api built using native NodeJs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published