https://github.com/gedgonz/contactapp
Basic api to create contacts
https://github.com/gedgonz/contactapp
async-await babel express glitch-me jwt mongodb mongoose nodejs
Last synced: about 1 month ago
JSON representation
Basic api to create contacts
- Host: GitHub
- URL: https://github.com/gedgonz/contactapp
- Owner: GedGonz
- Created: 2021-03-03T04:39:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-13T23:15:55.000Z (about 4 years ago)
- Last Synced: 2025-02-01T23:15:14.466Z (3 months ago)
- Topics: async-await, babel, express, glitch-me, jwt, mongodb, mongoose, nodejs
- Language: JavaScript
- Homepage: https://apicontacts.glitch.me/
- Size: 149 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Contactapp
This is a api basic developed with NodeJS for practices,
Using JWT for the authenticationThis api use syntax current JavaScript and Babel for the convertion syntax
## Mathod from the API
Will be able to access to api with the nexts routes:
URL: https://apicontacts.glitch.me
```cs
/api/contact -> (GET) Get the list from all contacts.
/api/contact -> (POST) Create a new contact./api/contact -> (PUT) Update a contact.
/api/contact -> (DELETE) Delete a contact.
```To make request from url is necessary generate a token for the authorization,
this authorization can do it to url:```cs
/api/user -> (POST) Token request for sent user.
```
For example in the body from request
```cs
{
"Username":"gedgonz",
"Password":"123"
}
```
This request respond with the toke objectfor example
```cs
{
"auth": true,
"toke": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Il9pZCI6IjYwNGQzMjI1ZTIwYjQxMTE1YmJmNmY0ZCIsIlVzZXJuYW1lIjoiZ2VkZ29ueiIsIlBhc3N3b3JkIjoiJDJiJDEwJDdFMjNGRDJXbm9ZdHAuSzBldVVibC5xOUlDcWhIdXJrU0xtSEJQbDg3WUJQakJFb2plc1VlIiwiY3JlYXRlZEF0IjoiMjAyMS0wMy0xM1QyMTo0NDowNS43NzlaIiwidXBkYXRlZEF0IjoiMjAyMS0wMy0xM1QyMTo0NDowNS43NzlaIn0sImlhdCI6MTYxNTY3MjQ1NSwiZXhwIjoxNjE1NzU4ODU1fQ.fryIIi-MlwqjpHF4q4672U77FKJqsrIAQpqPTVDBz-s"
}```
I hope it was clear! 😎