Contents tagged with Nodejs

  • Microsoft Sql Server driver for Nodejs - Part 2

    This post is part 2 of Microsoft Sql Server driver for Node js.In this post we will look at the JSON responses from the Microsoft Sql Server driver for Node js.

    Pre-requisites:

    • If you have read the Part 1 of the series, you should be good.
    • We will be using a framework for Rest within Nodejs - Restify, but that would need no prior learning.

    Restify:

    Restify is a simple node module for building RESTful services. It is slimmer than Express. Express is a complete module that has all what you need to create a full-blown browser app. However, Restify does not have additional overhead of templating, rendering etc that would be needed if your app has views. So, as the name suggests it's an awesome framework for building RESTful services and is very light-weight.

  • Microsoft Sql Server driver for Nodejs

    NOTE: Part 2 is available here

    Node is one of the recent geek fever everyone has been going through. With the continued support from Microsoft for Nodejs on both Windows and Windows Azure, it is bound to reach great levels. Last week, during TechEd, Microsoft released it's own version of a Sql server driver for Nodejs. Yes, now you can write javascript code on the server that will talk to Sql Server.

    Question: I haven't done any programming on Nodejs before this?

    Answer: Don't worry about it. As long as you know typing on a notepad. You should be good.

    NOTE: Documentation on this is still under construction but this blog post should get you started easily. If you have any questions during installation please feel free to contact me and I would be more than willing to help out.

    First database call:

    • Only on windows? Before we talk about it in detail it might be worthwhile to note that it only works if the nodejs server is running on a windows machine. Yes, that's true.
    • Does that mean you can't code on a mac? No, you can. In that case you can run the server on a windows box or one of the Windows Azure VMs. Cool!

      Alrite. Let's take a small Hello world example. I have database called Test with a table Employee and two columns EmployeeID and Name.