BeTheHero is a Restfull API of BeTheHero Web and BeTheHero Mobile
BeTheHero API is a project developed during the Semana Omnistack 11 presented by Rockeseat.
WEB: BeTheHero Web
API: BeTheHero Mobile
# Clone this repository
$ git clone https://github.com/Luksdantas/NodeJS-BeTheHero.git
# Access the project folder cmd/terminal
$ cd NodeJS-NPS
# install the dependencies
$ npm install
# Run the application in development mode
$ npm run dev
# The application will open on the port: 3333 - go to http://localhost:3333
POST /ongs
{
"name": "Example Ong",
"email": "example@example.com",
"whatsapp": "85900000000",
"city": "São Paulo",
"uf": "SP"
}
{
"id": "8035bc1a"
}
GET /ongs
[
{
"id": "8035bc1a",
"name": "Example Ong",
"email": "example@example.com",
"whatsapp": "85900000000",
"city": "São Paulo",
"uf": "SP"
}
]
POST /sessions
{
"id": "8035bc1a"
}
{
"name": "Example Ong"
}
GET /profile headers: {authorization: 8035bc1a}
[
{
"id": 3,
"title": "Example incident",
"description": "Example description incident",
"value": 10,
"ong_id": "8035bc1a"
}
]
GET /incidents
[
{
"id": 3,
"title": "Example incident",
"description": "Example description incident",
"value": 10,
"ong_id": "8035bc1a",
"name": "Example Ong",
"email": "example@example.com",
"whatsapp": "85900000000",
"city": "São Paulo",
"uf": "SP"
}
]
POST /incidents headers: {authorization: 8035bc1a}
{
"title": "Example incident",
"description": "Example description incident",
"value": 10.00
}
{
"id": 3
}
DELETE /incidents/:id
Made with ❤️ by Lucas Dantas 👋🏽 Get in Touch!