In this lab we will be making a simple blog platform. In many ways this app will be similar to the Daily Planet app. Feel free to modify it if you wish.
- User should be able to go to a form, and fill out a blog post
containing
post
andauthor
. - When storing the
post
use a1 to many relationship
between author and blog post. - Have a main route
/posts
that will contain all blog posts sorted by date. - Have a route to only display the blog post by 1 author. Use a url
like
/author/5
.
npm init
your project folder.- Specify the necessary dependencies with
npm install --save LIBRARY_NAME(S)
. - Create the
Author
andPost
models and migrations usingSequelize
. - Setup relationships between
Author
andPost
. - Create the views and routes with
Express
for creating and viewing your blog posts.
- Feel free to add
edit
anddelete
functionality.