Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mouracamila/nodejs-crud
This project was developed at RocketSeat Bootcamp 11. API with NodeJs
https://github.com/mouracamila/nodejs-crud
api crud express json nodejs nodemon query rocketseat uuid
Last synced: 7 days ago
JSON representation
This project was developed at RocketSeat Bootcamp 11. API with NodeJs
- Host: GitHub
- URL: https://github.com/mouracamila/nodejs-crud
- Owner: mouracamila
- Created: 2020-04-30T13:21:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T15:37:09.000Z (almost 2 years ago)
- Last Synced: 2024-07-30T20:10:39.592Z (3 months ago)
- Topics: api, crud, express, json, nodejs, nodemon, query, rocketseat, uuid
- Language: JavaScript
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
CRUD with Nodejs## Introduction
This is a basic structure for a project management application.
### Technologies used and their definitions:
- **NodeJS**: As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications.
- **Express**: Framework for building web applications on top of NodeJS.
- **CRUD**: Acronym for **C**reate, **R**ead, **U**pdate and **D**elete. It is set of operation for servers to execute (POST, GET PUT and DELETE).
- **UUID**: Generator of unique identifiers for objects.
- **Query parameters**: Are a defined set of parameters attached to the end of a url. They are extensions of the URL that are used to help define specific content or actions based on the data being passed. Making filtering and paging possible.
- **JSON**: The json() method of the Body mixin takes a Response stream and reads it to completion. It returns a promise that resolves with the result of parsing the body text as JSON.
- **Nodemon**: Utility that will monitor for any changes in your source and automatically restart your server.## Installation
1. Clone this Repository:
`$ git clone [email protected]:mouracamila/nodejs-crud.git`
2. Installing dependencies:
`$ yarn`
3. Running project:
`$ yarn dev`
##### Obs: **Yarn** should be run where **package.json** is in your project
#### After running the project, in your terminal, this message should be displayed:
```
[nodemon] starting `node src`
🚀 Back-end started!
```### Create project
`POST /projects`
#### Parameters
| Name | Type | Required | Description |
| ----- | ---- | -------- | ------------- |
| title | any | Yes | Project title |
| owner | any | Yes | Project owner |#### Responses
SUCCESS
`Code: 200````
{
"id": ,
"title": ,
"owner":
}
```### List project
`GET /projects?title=&owner=`
#### Parameters
Query parameters.
| Name | Type | Required | Description |
| ----- | ---- | -------- | ------------- |
| title | any | Yes | Project title |
| owner | any | Yes | Project owner |#### Responses
SUCCESS
`Code: 200````
{
"id": ,
"title": ,
"owner":
}
```ERROR
`Code: 400````
{
[]
}
```### Update project
`PUT /projects`
#### Parameters
| Name | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| token | any | Yes | Token UUID |#### Responses
SUCCESS
`Code: 200````
{
"id": ,
"title": ,
"owner":
}
```ERROR
`Code: 400````
{
"error": "Project not found."
}
```### Delete project
`DELETE /projects`
#### Parameters
| Name | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| token | any | Yes | Token UUID |#### Responses
SUCCESS
`Code: 200````
[]
```ERROR
`Code: 400````
{
"error": "Project not found."
}
```## License
This project is under license from [MIT](https://en.wikipedia.org/wiki/MIT_License).
---
with ❤ - [MouraCamila](https://github.com/mouracamila)