Fuseday 2013 - My experience with NodeJS, SailsJS and a bit of Mongo

Based on my experience on the fuse day:
First of all I want to mention that I had minimal knowledge of Java script or any of its technology. I am Java server side and therefore I chose this fuse day to have some entry point into JS technologies.
I took small task. I had to create a mechanism which implementing User's Favorite.
The service we implemented smelled like a backend service which drove me to use NodeJS. 
The documentation and the installation of Node is very easy and straight forward. In one hour (for someone who has basic knowledge) we managed to install and run nodeJS.
Upon node we installed Sailsjs which cut through our way with many Node configurations. We store the information on Mongo.
 It was amazing that after 2-3 hours(again with minimal knowledge) we manage to have running Node service upon it SailsJS which able to receive client requests and perform CRUD operations on Mongo.
The documentation of Sailsjs is very neat. I still cant tell(yet) how much you "earn" using Sailsjs than using using pure nodejs but things got faster.
Some snippet from Sailsjs configuration:
1 .Add the mongo config to the config/adapters.js file:
(We just need to set  adapter: 'Mongo' and we are good to go)
 * User
 * @module      :: Model
 * @description :: A short summary of how this model works and what it represents.
module.exports = {
    adapter: 'mongo',
    attributes : {
        videolist: 'array',
        user: 'string'
An example of how accepting a user request, extracting his id and adding his favorites to Mongo:
*Assume we extract the video list from the request. But here, it's hard coded just for the example simplicity 
   create: function (req, res) {
   console.log("print req:", req);
  userid: req.userId,
  videolist: ["hobbit","soccer","node busters"]
  }).done(function(err, user) 
The technology is fun. The code is short and efficient. 
Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com