- Serve a homepage using Flask
- Create API routes that return and accept JSON
- Handle GET and POST requests on the back end
- Connect a Flask back end to a static front end
- Pass all provided back end tests
git clone <repo-url>
cd course-8-module-6-connect-client-server-labUsing Pipenv:
pipenv install
pipenv shellpython server.pyThen open client/index.html in your browser to view the frontend.
To check your work, run:
pytestAll tests must pass to complete the lab.
- Implement the
/route to return a welcome message in JSON - Implement a
GET /eventsroute that returns all event data - Implement a
POST /eventsroute that accepts a new event and returns it with status 201 - Return a
400 Bad Requestif required data is missing in a POST
.
├── client/
│ ├── index.html
│ ├── styles.css
│ └── script.js
├── server.py
├── tests/
│ └── test_app.py
├── Pipfile
├── Pipfile.lock
├── README.md
Good luck! 🚀