GithubHelp home page GithubHelp logo

bwdbooks / nodejs-mongodb-angularjs-web-development Goto Github PK

View Code? Open in Web Editor NEW
318.0 318.0 342.0 3.68 MB

For the Node.js, MongoDB and AngularJS Web Development Book

JavaScript 95.49% CSS 4.51%

nodejs-mongodb-angularjs-web-development's People

Contributors

bwdayley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodejs-mongodb-angularjs-web-development's Issues

Ch16 - monggose_save.js Validation Error!

The code to update a doc using the save() fails with a validation error. It turns out that the 'book' word used in the example fails to satisfy the schema particularly with its 'charsets' property which in the database is an empty array.
to make the example work either one of two options can be used:

  1. disable validation by adding after line 3 the statement:
    wordSchema.set('validationBeforeSave',false);
  2. or modify the book documents to add the missing value of the property 'charsets' .

I get a throw er:

When I try to run the code I get this error:

node auth_server.js

events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EACCES
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1020:19)
at listen (net.js:1061:10)
at Server.listen (net.js:1135:5)
at Function.app.listen (/home/ubuntu/htdocs/joolip/node_modules/express/lib/application.js:532:24)
at Object. (/home/ubuntu/htdocs/joolip/auth_server.js:27:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

chap 6-reading async file

I believe there is something wrong with the code, as I am receiving an error code of 'fd must be a file descriptor'.

Can you please advise? Thanks

How to setup the shopping cart application.

I am new nodejs/mongodb I see the code but I want to know how to execute shopping cart app. there are other files missing like package.json or may be other files. can you help to set it up?

BodyParser and express-session out of date in samples

Hi Brad,
I really liked your book "Node.js, MongoDb, Angularjs Web Development". Only issue I had with your GitHub files is that bodyParser has been depreciated and the new info isn't in your samples. I think this happened about the time you published the book.

I changed samples as needed to be:
app.use(bodyParser.urlencoded({ extended: true }));
app.use(cookieParser());

Also express-session seems to need resave and saveUninitialized to be set to true/false (no longer defaults)

After the above changes ALL your samples ran great! (and that's a big deal). Your book is one that I will keep close at hand. Thanks much!

I would offer the changes as a pull request but I have mangled your samples trying out various "what happens if I do this" experiments.

Cheers
Charlie

need package.json

I have mongodb installed and trying to run chapter26 with command: node auth_server.js and I get error: Failed to load c++ bson extension, using pure JS version. I tried various option to upgrade/downgrade mongodb but could not get around the issue. Is it possible to include package.json in chapter26 first and later to other so I could run npm install and get all the correct version of required package.

Regards,

Praveen

Chapter 8 listing 8.1 causes error

On chapter 8 after running

node socket_client.js

I get the error

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect ECONNREFUSED
    at errnoException (net.js:904:11)
    at Object.afterConnect [as oncomplete] (net.js:895:19)

Ch 19 - Express-Auth-Session.JS

I believe that line 57: res.redirect(/'login'); would cause an error since you already redirect in line 55, during an authentication failure. When I run the sample, the app crashes out when you enter an invalid password. Removing line 57 fixed it.

The error: Error('Can't set headers after they are sent.')

doc_paging error

Ch15 : doc_paging.js
I thought that placing the pagination within a recursive call would be a good idea as well but the recursion occurs quicker than mongodb can query the database. So on my machine the database is closed before each 'page' is printed.

What would be a good workaround for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.