You can do anything in Javascript!

This is my first blog post! 🙂

I have always been deluded by the misconception that Javascript can only be used to make a webpage interactive. As a matter of fact, that was what I was taught a few years ago when I took a HTML/CSS/Javascript course. But things have changed a lot since then. With technologies like Node.js, Require.js, Travis CI… the possibilities are endless.

I am still a beginner in Node.js. This week, we were required to create an app that would extract links from a markdown file. Seems pretty straightforward! But here’s the catch – the logic for the extraction should be a separate module so that the module can be used to create two apps: one that will run on a browser and another that will work on command line.

Here’s where Node.js came in. Node allowed me to create these parts of the app using a modular approach. First, I created a module that would simply get the links. I pretty much match a regular expression pattern to get the links. But after chatting with my colleagues, turns out there are several ways to do this. In fact, I was told that was a better approach…it was 🙂

Require.js made my work even simpler. It allowed me to include my node module as a javascript module in my html file. So, I was able to run it on both the command line and on a browser.

I am excited to see what else you can do with Node and javascript in general and I am sure with the help of my team, we will be able to create innovative apps using javascript…can’t wait to see what our next challenge will be 🙂 / May 13, 2014 / CDOT / 0 Comments