Skip to content

Instantly share code, notes, and snippets.

@chrisco
Created June 17, 2016 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisco/515445d09fa1c35bd57cd851432df08e to your computer and use it in GitHub Desktop.
Save chrisco/515445d09fa1c35bd57cd851432df08e to your computer and use it in GitHub Desktop.

CRUD Blog

Today, you're going to build a blog. It will have users, posts and comments. The users will have many posts. The posts will have many comments. The comments will also be associated with users.

General Instructions:

Setup and planning

  1. Come up with a name for your blog
  2. Wireframe each view
  3. Create a data model
  4. Generate an Express app with handlebars
  5. Don't forget npm i
  6. Set up a git repo and a .gitignore file
  7. Install and configure Knex and your local database
  8. Install and configure the dotenv module
  9. Create routes and handlebar files for each view
  10. Generate migration files (think about the order that you create these in)
  11. Generate seed files (think about the order of, not only running the files, but deleting tables within the seed files)
  12. Run your migrations and seed files
  13. Commit
  14. Deploy your app and database to Heroku
  15. Run your migrations and seeds on Heroku

Write CRUD for each of your routes

  1. Scaffold out the 7 routes for each of your resources
  2. Write the CRUD knex statements for each route

Style your blog

  1. Personalize your blog with some style.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment