A Rest API build with Node.js and Express. This API have two types of users, a Admin and Customer. The Admin can Create, Edit and delete new dish to menu that contains a Name, image, category, ingredients, price and a description. The Customer can interact with the menu, view details, search, set as favorite and include on a order list.
FrontEnd repository: Link
- Node.js
- Express
- SQLite
- Knex
- Cors
- JWT
- Clone the repository;
- Install dependencies (
npm install
) - Run application (
npm run dev
)
Create a new user.
{
"name": "username",
"email": "useremail@email.com",
"password": "123456"
}
{
"email": "useremail@email.com",
"password": "123456"
}
/menus?name
/menus/:id
Create a dish.
{
"name": "dish name",
"description": "dish description",
"price": "12,34",
"category:": "dish category",
"ingredient": ["tag1", "tag2", "tag3"]
}
PATCH`/menus/img/:id`
Update a dish.
{
"name": "dish name",
"description": "dish description",
"price": "12,34",
"category:": "dish category",
"ingredient": ["tag1", "tag2", "tag3"]
}
/menus/:menu_id
/favorites/:user_id
{
"name": "product name"
}
/favorites/:id
/tags/:menu_id
/payment/:user_id
{
"quantity": "1",
"menu_id": "1"
}
/payment/:id