jamie-wk/CRUD-express-wdi12

server.js ....

Opened this issue · 0 comments

[process question] line 2, 3, 21 -- What is going on here? What are we getting and setting?
2 const path = require('path')
3 const logger = require('morgan')
21 app.use(loger('dev'));

[documentation] line 4, 5 - getting - (keyword: require) npm package, Express and Handlebars
[documentation] line 8 - setting express function to app
[documentation] line 9 - tells app which local PORT to run on. ala localhost3000
[documentation] line 6 - requires 'body-parser' package and sets it to the variable bodyParser.
[documentation] line 10 - gets the controller and set it to the variable todosController

[documentation] line 14 - gets the override method and sets it to eh variable methodOverride.
[documentation] line 19 - anytime you use the query parameter '?__method' says do this -what is assigned to it, not what comes next.

[documentation] // [process question IS THIS RIGHT?] line 23 app.use(bodyParser) gives you access to the body of the site, which is required before you can do any updates (PUT/POST) or deletes (DELETE).
[documentation] line 26 - tells app to use handlebars to render our content. Handlebars allows HTML to be dynamically rendered on site.
[documentation] line 29 -