You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get data from database ( getData query to get only the meals name and its img).
Send data to the front-end using home.hbs by res.render('foods', {getData result}).
2. GET /meal/:id
Back-end side
Getting the id of the selected meal by using req.params.id.
Passing the id to the getMealData query to get all data about the selected meal(the data that should return is: foodName, country, img, description, in that order).
Send the data to the front-end using meal.hbs by res.render('meal', { getMealData result }). Front-end side
I should have a meal.hbs file to send the data in.
3. POST /meal
Create a form using postMeal.hbs.
Take the form's information and send them to the database using postMeal query.
The text was updated successfully, but these errors were encountered:
All the endpoints of this app:
1.
GET /
2.
GET /meal/:id
Back-end side
Front-end side
3.
POST /meal
The text was updated successfully, but these errors were encountered: