Author Archives: James Keppel

After finding that the node.js PM2 plugin was only supported in linux, I had a reason to dust off my LMDE VM.

When building CynanogenMod ROMs for my HardKernel ODroidU2, I quickly outgrew Ubuntu, which I choose due to the huge amount of community support, and the references to it specifically in various Android ROM building getting started documentation.

Linux Mint was next, though I soon after settled on Linux Mint Debian Edition to make advance of the rolling releases, perfect for a tertiary VM. I could jump in after it being offline for months at a time, and be on the latest version after tackling the backlog of updates, as opposed to having to rebuild, being the recommended upgrade path of various other distros.

The customised Mint-X theme with Buuf 3.6 Icons reminded me how much time i had setting up this VM. This included creating a custom Gnome Desktop Manager page based off RastaGrrl's GDM Theme by hand with Pluma for the XML and Gimp for the Icons.

Buuf ThemeLogin

GParted was still attached to the Virtual CD Rom, for when I had to expand the partition, for the second time, as I couldn't bring myself to start from scratch after I underestimated the local storage needed to build one, and them multiple ROM branches from scratch.

LMDE just seems to be built by Devs for Devs, with none of the irritants that drove me away from Ubuntu, which when incurring frustration seemed to be the perfect example of the camel the committee inadvertently designed. From the Granted permissions without asking for password dialog to the lack of OS branded services trying to be pushed onto me. (Looking at you Ubuntu One,), it just felt like home, even if some of the flashier desktops were not available in debian packages.

While the update from LMDE 1.0.6 to 1.0.9 was a few hundred K, the 1081 recommended updates coming in at 788 Meg showed that maybe it was a bit too long between visits.

Looks like my experimentation with node.js under linux may have to wait till tomorrow.

With some basic tutorials under my belt, I decided to see what cloud offered in term of node.js IDE's.

The Cloud 9 node.js IDE was my first stop, and I have to say, unlike Sublime Text with a suite of plugins, it did not leave me wearing, though I admit it's not exactly fair to compare an extensible text editor to a IDE.

While I still have much I want to try, my next investigation was into running node.js locally.

Forever was the first on my radar, which persists a running node script over server and and restarts. Devo.ps blog on their preference of PM2 then caught my attention. PM2 also offers cluster load balancing, JSON configs and few production level features has taken over in popularity.

I then came across a blog post I that, as a node newbie, I found quite useful, 7 tips for a Node.js padawan by Faisal Abid. Its recommendation to use nodemon for dev, and PM2 for production made a lot of sense, especially since PM2 is not design for windows use, time to dust off the LMDE server I usually reserve for Android ROM work.

My next search, being the visual guy I am, I was looking for an all in one local web dashboard, process monitoring, server management & performance monitoring app. This stackoverflow answer, resulted in the context switch I needed from my IIS heavy background to the lightweight node.js space. What I need is not a monitoring app, but a node.js script, or a plugin or two to run on a second port, which monitors the first, as well as Finally, PM2 or whatever else i'd like to keep an eye on.

There also seems to be quite a market for node monitoring apps, such as nodetime and strongops, let alone what the cloud hosting apps themselves offer. Seems as though I am putting the cart before the horse, as I would suspect it best to rule out if an app would use cloud hosting before trying to reinvent the wheel in term of monitoring.

With that small exploratory tangent into the node.js space complete, it's back to Cloud 9 until I get a chance to compare it to Codeenvy, CompilrKoding, and whatever else enters this rapidly growing space between now and then.

2 Comments

Have been working through the node.js via Learn you node tutorials and thought it a good opportunity to see if I could get a node.js auto complete/hint plugin.

Unfortunately the nodejs plugin is no longer active,. and it did not seem to be namespace aware, that is, it would not narrow the filter based on the namespace. Entering 'a..' gave the same filtered list as 'fn.a...', as one of the motivations of my search was to have an easy way to explore namespaces, it wasn't going to cut it.

Enter SublimeCodeIntel. I was hoping to kill two birds with one stone and find something that turned a XSD into a hint file for  XML. This would help me edit web.config files using the DotNetConfig.xsd, though no luck. Will have to resume that search another time.

SublimeCodeIntel worked fine out of the box, until I started editing the settings. Saving the user preferences without the encompassing curly braces around the all my setting crashes SublimeText, hard. Only Ctrl-Alt-Del could kill her, though the Unexpected trailing characters message did point me to the first line that helped me get that sorted quickly.

The next issue was enabling the node.js autocomplete. The sublime forums almost got me there, though it was a post right at the bottom on an old bug on the plugin's github page that illuminated what I was missing. There are two parts, firstly, codeintel_syntax_map.

"codeintel_syntax_map": {
  "JavaScript": "Node.js"
}

And my missing piece of the puzzle, javascriptExtraPaths

"codeintel_config": {
  "JavaScript": {
    "javascriptExtraPaths":["./Packages/SublimeCodeIntel/libs/codeintel2/lib_srcs/node.js"],
    "codeintel_scan_files_in_project": false,
    "codeintel_max_recursive_dir_depth": 2
  }
}