This is a project created to learn how to develop REST APIs, using Node.Js, with Express.js and SQLite.
To use the project, it is necessary to have installed Node.Js
Download the project by executing the command below
git clone https://github.com/eduardopinheiromr/rest-api.git
When downloading, in the main directory, execute the command
npm install
When you finish downloading and installing the packages, run
nodemon server.js
The server will start at the url http://localhost:8080/
To return all tasks from database in JSON
http://localhost:8080/tasks
To return a specific task, use the route task/id
, example
http://localhost:8080/task/1
To delete a task, use the route task/id
, example
http://localhost:8080/1
To create a new task, send the content in body with post
http://localhost:8080/new-task
To edit a task, use the route task/id
, example
http://localhost:8080/1
BODY OF OBJECT NEEDS TITLE AND DESCRIPTION FOR POST AND PUT