1

I'm learning the MEAN stack and I'm using npm start to run my application. I have some issues with Mongoose and MongoDB but all I get is POST /page 500 63.925 ms - 961

This is the directory structure of my app, based on this tutorial:

HTML        views/
Angular.js  public/javascript/
Express.js  routes/
Node.js     app.js
Mongoose js models/, connected in app.js
Mongo db    connected in app.js

What can I do to get helpful Mongoose and MongDB debug messages?

Melissa
  • 1,236
  • 5
  • 12
  • 29
  • You're using some kind of logging middleware, you'll have to configure it to change the format or read the docs to understand what - and 961 means. My guess is that's the response size. – Kevin B Oct 08 '15 at 22:20
  • As far as errors go, you'll want to add an error handler to express. – Kevin B Oct 08 '15 at 22:21
  • can you show the code that is breaking? – Alvaro Silvino Oct 10 '15 at 01:31
  • Hi Alvaro, [this is the code that is breaking](http://stackoverflow.com/questions/33028273/cant-get-mongoose-to-give-me-a-list-of-documents-in-the-collection). Thanks for helping out. – Melissa Oct 10 '15 at 01:55
  • Use [`node-inspector`](https://github.com/node-inspector/node-inspector) to be able to run your code under a real debugger so that you can set breakpoints, step through code, etc. – JohnnyHK Oct 10 '15 at 02:01
  • Hi JohnnyHK, thanks for letting me know! Can you show me how to use `node-inspector` with `npm start`? Please answer my question [here](http://stackoverflow.com/questions/33090353/how-to-use-node-inspector-with-npm-start-for-my-application) – Melissa Oct 12 '15 at 21:21

1 Answers1

1

Using node-inspector is very helpful. This question and answer showed me how to set it up in my case.

Community
  • 1
  • 1
Melissa
  • 1,236
  • 5
  • 12
  • 29