Simple CRUD Backend I made using Express JS,Mysql & ChatGPT.
tipis tipis ๐ฅ ๐ฅ ๐ฅ.
menyala abangkuh ๐ฅ ๐ฅ ๐ฅ.
Base Url : https://belajar-backend-okev.vercel.app/api
endpoint : /register
method : POST
form-data: username
,password
headers: Accept: application/json
{
"msg": "User Successfully Created",
"user": {
"userId": "a1f5d19c-db39-4715-8300-b3c467c189c8",
"username": "anjaymabar",
"updatedAt": "2024-01-31T13:24:09.838Z",
"createdAt": "2024-01-31T13:24:09.838Z"
}
}
Note: We apologize for any inconvenience you may be experiencing. Currently, our servers are located at a considerable distance, impacting performance.
endpoint : /login
method : POST
form-data: username
,password
headers: Accept: application/json
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InN1cGVybWFuIiwicGFzc3dvcmQiOiIxMjM0NSIsImlhdCI6MTcwNjcwNTc4NSwiZXhwIjoxNzA2NzA5Mzg1fQ.nVL4FNPTMNh65YhwyeVsKp8cpJ6pZqyFyNihcO0MW7Y"
}
endpoint : /products
method : GET
authorization: Bearer Token
headers: Accept: application/json
[
{
"id": 3,
"name": "Laptop",
"imageUrl": [
"https://ucarecdn.com/8a0e775b-df28-45d1-af5d-bdeaa2b77f85/"
]
},
{
"id": 4,
"name": "Camera",
"imageUrl": [
"https://ucarecdn.com/f4c105f7-6e5a-4518-a4f1-461391f24449/"
]
}
]
endpoint : /products/1
method : DELETE
authorization: Bearer Token
headers: Accept: application/json
{
"msg": "Product Deleted Successfuly"
}
Note: Untuk Endpoint yang lainya menyusul kalo lagi gabut xixi.