We've set you up in starter-code with an API for capturing your favorite embarrassing quotes – Quotes, Inc. We've thrown in a few styles for you, too, but you might have to mimic some class names and templates. Feel free to delete our style and fancy it up on your own.
Your goal will be to convert an Express JSON API to render full HTML views. It's up to you to take it from JSON to EJS, and we haven't given you a lot to start with. This will be good practice for installing the tools you need and setting them up from scratch.
If you are unsure of where to start, the previous lesson will be a helpful reference.
- Use EJS to create views for your RESTful routing as follows:
- Add
ejs
configuration toapp.js
- Create a
views
directory - Create an
index
page* - Create a page to create
new
quotes with a form* - Display these pages with your controller
- Create one partial for a footer that gets rendered on each page
- Create one partial for a header that gets rendered on each page
- Add
* It may be a good idea to use Postman to POST some sample quotes to test these pages
- Render forms that submit data back to our Express app to make a full-stack app
Do as much as you can – the more complete the better – but at the least you should strive to create an index & a new page to POST to your create action.
Do your best to make it stylish, bonus points for prettiness. Below is an example of an index
page and a new
page.
All content is licensed under a CCBYNCSA 4.0 license. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].