Solo MEHN Lab: stackOverflow project
Built an app using full CRUD
- Create index.js
- Test if you're able to connect to Express and send hello world to the browser
- Install necessary dependencies
- Create file system
- create routes and test hello world first
- build out the controllers and test that the routes still work
- Work on views - install body parser
- create a simple view for each hbs file. Use a header tag and check that it renders
- Once views are scaffolded, we need to create data. Connect to mongoose in db folder and Define question model
- install mongodb
- Add test data - aka data seeding and run it in mongo
- display test data on homepage
- Create a new question - setup views and controllers
- show the new question
- Edit/Update a question
- Install methodOverride
- Add Delete feature
- Update show views to include Edit, Home, Delete button
#File System
-Post Question -title -description
Directories Routes - index.js, question.js Controllers - question.js Views - index.hbs and layout.hbs, question directory with new, show, and edit, hbs Models - index.js db - connection.js and seed.js
- Submit answers -solution
Note the relationship between the two. There can be many questions. A question can have many solutions. A solution cannot have a question.
Bronze plan: Create, Read, Update, and Delete a question.
Gold plan is to add answer model