Developer's Perception

Odd thoughts from a developer.

Linux With Nodejs and Mongo on Windows Host

| Comments

So finally the time has come where we have decided to give the node and mongo combination a closer look at my work. Not that we are going to migrate everything to such a platform tomorrow, but the combination of node and mongo is so promising that we decided to give it a try to see how far we can get.

Basic Setup

This is the setup we are going for sofar (will probably change as we get smarter – please feel free to help with that):

  • Virtual Box on windows (we used to be a .NET based Software only – so everyone has Windows machines) – (https://www.virtualbox.org/)
  • Linux 64 bit on the virtual box:
    • Ubuntu 64 bit (my work setup)
    • Mint 64 bit (my home setup): not as detailed as the Ubuntu version – so if you get stuck refer to that one
  • Sharing of the code folder between Windows host and Linux virtual machine:
    • Setup local account on windows machine.
    • Share code folder on windows machine – ensure that the local account you just created has both read and write.
    • Go to /home/<linux_username> and mkdir sourcecode (or whichever name you prefer)
    • Go to Linux and edit /etc/fstab (for instance sudo gedit /etc/fstab should do the trick)
    • Add the following at the bottom of the file (there are not supposed to be any line breaks in the command, white spaces are important, and commas likewise)
1
2
 //<ip_host>/<share> /home/<linux_username>/sourcecode cifs 
rw,user,uid=<your_linux_loginname>,gid=<linux_username>,username=<win_username>,password=<win_password>,_netdev 0 0
1
2
3
4
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C7917B12
sudo apt-get update
sudo apt-get install nodejs
  • Getting mongo installed – this looks promising (have not tried yet): (http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages)
  • What editor to use?: Have not decided completely yet, but currently I am considering:
    • sublime text. I am testing right now, and so far it has really blown my mind – install the intellisence package to get the full power.
    • Webstorm. I have been using for JavaScript for a while and I simply love it, so it says something about the promise of sulime 2 that I am testing it right now.

That is it for now… Will write more when we have the last details of our environment up and running, such as mongo install and how to structure our nodejs application in folders etc.

Comments