Node.js and nodejitsu - Continued

I continue working on my little node js - mongodb - backbone js app which runs locally and on nodejitsu here.
You can read more on my first post here.

So I hooked in some basic mongodb
Nodejitsu supports mongodb, couch and redis. I created a mongodb db following the instructions here in the nodejistu manual
Nodejitsu provides you keys and access code to access the db. Through r&d and trial and error I got some functions to seed, list and remove data.
I modified the code to read the bookReviews collection when users hit the landing page and return the landing page with that json data bootstrapped.

I deployed using "jitsu deploy" and got an error related to mongo db. I kinda figured I needed to add it to dependencies so I updated the package.json as follows. I tried various versions for mongodb but hit on the >=0 solution looking at the rest of the package.json. This fixed it and the latest code is deployed.
  "dependencies": {
    "mongodb": ">=0"
  },

Look, I know at this stage I should be using a web framework such as Express (or Flatiron) however its proving a useful learning experience to forgo that... so I plan to push on some more with my "homegrown" approach. Then I plan to rewrite it all using a web framework!

You can check the server request to see if its a GET or POST/PUT.

Now I'm ready to focus on the frontend e.g. more HTML, css, backbone to load bootstrapped json and use it to display book reviews

Comments

Popular posts from this blog

deep dive into Material UI TextField built by mui

angular js protractor e2e cheatsheet

react-router v6.4+ loaders, actions, forms and more