So, I get MEAN. Everything is installed. However, I have some problems, and I hope to get a little guidance on reading these error logs. I am leaving from Rails for reference.
First of all, after http://mean.io/ , npm install there were some problems, but updating and clearing the cache took care of this. Now I grunt. The first thing I get is:
Express app started on port 3000 events.js:72 throw er; // Unhandled 'error' event ^ Error: failed to connect to [localhost:27017] at null.<anonymous>(D:\Dropbox\Apps\mean_projects\first\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\server.js:540:74) at EventEmitter.emit (events.js:106:17) at null.<anonymous> (D:\Dropbox\Apps\mean_projects\first\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\connection_pool.js:140:15) at EventEmitter.emit (events.js:98:17) at Socket.<anonymous> (D:\Dropbox\Apps\mean_projects\first\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\connection.js:478:10) at Socket.EventEmitter.emit (events.js:95:17) at net.js:441:14 at process._tickCallback (node.js:415:13) 22 Dec 21:03:14 - [nodemon] app crashed - waiting for file changes before starting...
So, I guessed and thought, maybe I had to manually start the mango? mongod , then in the new grunt console. Express app started on port 3000 !! Woot. When visiting http://localhost:3000/ I get this monster:
Error: D:\Dropbox\Apps\mean_projects\first\app\views\layouts\default.jade:1 > 1| !!! 5 2| html(lang='en', xmlns='http://www.w3.org/1999/xhtml', xmlns:fb='https://www.facebook.com/2008/fbml', itemscope='itemscope', itemtype='http://schema.org/Product') 3| include ../includes/head 4| body `!!!` is deprecated, you must now use `doctype` at Object.Lexer.doctype (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\lexer.js:246:13) at Object.Lexer.next (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\lexer.js:812:15) at Object.Lexer.lookahead (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\lexer.js:111:46) at Parser.lookahead (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\parser.js:109:23) at Parser.peek (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\parser.js:86:17) at Parser.parse (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\parser.js:124:26) at Parser.parse (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\parser.js:138:24) at parse (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\jade.js:95:62) at Object.exports.compile (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\jade.js:152:9) at Object.exports.render (D:\Dropbox\Apps\mean_projects\first\node_modules\jade\lib\jade.js:256:15)
So, I think this is the first or second problem, and the rest just flock to the parent elements, right? Something is wrong in my layouts/default.jade file. Everything is there, I have not made any changes. Jade is very similar to HAML ... I think I will like it!
Should I run mongod manually? And in that case, shouldn't something start in my project? I am a little confused by this. I actually jump into this whole MEAN case because I want to learn mango and NoSQL, so I definitely need to get away from it.
So, I would like to run this. Any other tips and tricks that you can throw at me will be very grateful!