web-development-with-node-and-express icon indicating copy to clipboard operation
web-development-with-node-and-express copied to clipboard

git checkout ch17

Open douglasv opened this issue 10 years ago • 3 comments


the js files don't start with: (function(){ 'use strict';
}());


1)- server can't start missing "credentials.js"

2)- node.js complains: express-session deprecated undefined resave option; provide resave option meadowlark.js:100:35 express-session deprecated undefined saveUninitialized option; provide saveUninitialized option meadowlark.js:100:35 express-session deprecated req.secret; provide secret option meadowlark.js:100:35 body-parser deprecated bodyParser: use individual json/urlencoded middlewares meadowlark.js:102:31 body-parser deprecated undefined extended: provide extended option node_modules/body-parser/index.js:85:29

3)- Error: Can't set headers after they are sent. at ServerResponse.OutgoingMessage.setHeader (http.js:689:11) at ServerResponse.res.setHeader (/home/douglas/workspace/web-development-with-node-and-express/git checkout ch17/node_modules/connect/lib/patch.js:134:22)

4)- GET /css/main.css 404 222.462 ms - 2979 GET /css/cart.css 404 148.158 ms - 2979

5)- at ServerResponse.res.setHeader (/home/douglas/workspace/web-development-with-node-and-express/git checkout ch17/node_modules/connect/lib/patch.js:134:22)

douglasv avatar Dec 30 '14 14:12 douglasv

What files don't start with a closure? This is only something that I would do with front-end dependencies (I prefer not to contaminate my Node JavaScript with those artifacts, though I have no issue putting use strict as the first line of a Node script). It's also not a requirement for front-end files, and I won't consider it a bug if there are front-end files without this closure....

EthanRBrown avatar Dec 30 '14 15:12 EthanRBrown

Also, I can't tell...are you having issues with being able to run the project because credentials.js doesn't exist? As explained in the book, the whole point of credentials.js is that sensitive credentials are externalized so they aren't accidentally committed. You have to construct your own credentials.js, instructions are in the book.

EthanRBrown avatar Dec 30 '14 15:12 EthanRBrown

Thank you for your replay Douglas

On Tue, Dec 30, 2014 at 10:59 AM, EthanRBrown [email protected] wrote:

Also, I can't tell...are you having issues with being able to run the project because credentials.js doesn't exist? As explained in the book, the whole point of credentials.js is that sensitive credentials are externalized so they aren't accidentally committed. You have to construct your own credentials.js, instructions are in the book.

— Reply to this email directly or view it on GitHub https://github.com/EthanRBrown/web-development-with-node-and-express/issues/16#issuecomment-68368259 .

douglasv avatar Dec 30 '14 17:12 douglasv