Skip to content

Latest commit

 

History

History
47 lines (40 loc) · 3.26 KB

README.md

File metadata and controls

47 lines (40 loc) · 3.26 KB

Interaction Programing - Lab 1

This project contains the startup code for Lab 1, which focuses on the model. For more details on how to complete the assignment follow the instructions on the course website.

Git Setup instructions

Configuring the API

This application uses the spoonacular API. In order for the application to work it needs to have access to that api. In order to grant the application access to the api you must rename apiConfig.js.template to apiConfig.js in /src/model/. Then fill in the ENDPOINT and API_KEY constants with the endpoint for making API fetches and your spoontacular api key. Once you've done so, these constants can be used in /src/model/dinnerModel.js.

IMPORTANT: Do not name the file anything other than apiConfig.js, otherwise your api key might end up on github. If you do rename the file to something other than apiConfig.js, then be sure to include that file in the gitignore!

Testing

Open index.html in the browser and tests should run automatically

What's in this repo

  • index.html - open to run the tests.

  • src/model/dinnerModel.js - write code here. This is a skeleton for the model of the application, but it does not yet support the functionality needed (number of guests, selected dishes, et.c.). It also contains a first dummy hardcoded "database" to use as test data.

  • src/model/dinnerModel.test.js - tests for the model. You do not need to modify these, but study how they are written. You might be asked to write more tests in the future. In your opinion, do these tests cover the most important areas, or would you have written them differently?

  • src/app.js - this is the overall code of the application. It is responsible for initial setup of the app (when the page loads for the first time). You will find it more relevant when you start working with views in future labs.

  • images/ - folder contains some pictures you can use for your dishes.