Node and developing on multiple machines

120 views
Skip to first unread message

Ralphtheninja (Magnus Skog)

unread,
Jun 22, 2012, 5:52:25 PM6/22/12
to nod...@googlegroups.com
Hi,

It's very common that I use several machines while developing and those machines might also be in different locations. I have two machines at home and two machines at my moms etc. There might be more machines in the future. My problem is this. No matter where I am, I just want to sit down and code and not care about what modules I have installed and where. If I'm visiting my mom some day I might find this uber cool module and install it globally with npm on that machine. When I get back home I'd like to sync my global modules on my other machines, instead of having to remember that I installed module X on machine Y. Do you have any recommendations?

Thanks
/Magnus

Elijah Insua

unread,
Jun 22, 2012, 6:00:25 PM6/22/12
to nod...@googlegroups.com
dropbox

/Magnus

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Dan Milon

unread,
Jun 22, 2012, 5:59:24 PM6/22/12
to nod...@googlegroups.com
That wont work for binary modules.

Is it such an overkill to just install global modules on the fly as you
need them? on any computer.
> <mailto:nod...@googlegroups.com>
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> <mailto:nodejs%2Bunsu...@googlegroups.com>

Mark Hahn

unread,
Jun 22, 2012, 6:07:08 PM6/22/12
to nod...@googlegroups.com
For what it's worth, I have my only development environment on one "server" and I just remote into it from all the others.  I literally see the same exact environment everywhere.

John Fitzgerald

unread,
Jun 22, 2012, 6:22:53 PM6/22/12
to nod...@googlegroups.com
I do the same as Mark, a few cloud servers that I remote into for development. I'm often jumping between a mix of several Win7/Centos/Ubuntu machines - to do remote development I use the following scenarios:

1. On either, ssh with console vim.
2. On linux, I'll do a fuse ssh filesystem mount and then use vim/sublime text.
3. On windows, I do an ssh tunnel & samba mount to local drive, then vim/sublime text.

Whatever I'm working on is either tunneled to a local port to access via browser, or behind http auth. 
John R. Fitzgerald


felix

unread,
Jun 22, 2012, 8:43:29 PM6/22/12
to nod...@googlegroups.com
git?

Tim Dickinson

unread,
Jun 22, 2012, 9:16:15 PM6/22/12
to nod...@googlegroups.com
Look at cloud9, its all web based.

alFReD NSH

unread,
Jun 23, 2012, 2:05:41 AM6/23/12
to nod...@googlegroups.com
John, mark. Don't you guys have any problem with the latency?

Dan Milon

unread,
Jun 23, 2012, 5:50:22 AM6/23/12
to nod...@googlegroups.com
I dropped sshfs for some interval'ed rsync because of editors hanging
when they have to scan directories stat everything and stuff.

Ralphtheninja (Magnus Skog)

unread,
Jun 23, 2012, 5:59:44 AM6/23/12
to nod...@googlegroups.com
I've seen Cloud9 and their services are really cool. However, I'd like to have more control and most of all, absolute control over my editor, e.g. emacs or vim. I'm aware of that they have support for vim, but it the key bindings conflict with the vimium plugin for chrome which bothers me a lot.

Ralphtheninja (Magnus Skog)

unread,
Jun 23, 2012, 6:02:56 AM6/23/12
to nod...@googlegroups.com
I've tried building up an environment on Dropbox, but it's not entirely reliable. Also, it's difficult with compiled binaries and having similar but not identical operating systems, e.g. ubuntu on machine A and linux minth on machine B etc.
dropbox

Ralphtheninja (Magnus Skog)

unread,
Jun 23, 2012, 6:17:50 AM6/23/12
to nod...@googlegroups.com
Ok, so you either do 1 or 2 on linux, or do 1 or 3 on windows? Or do you combine them?


Den lördagen den 23:e juni 2012 kl. 00:22:53 UTC+2 skrev John Fitzgerald:
I do the same as Mark, a few cloud servers that I remote into for development. I'm often jumping between a mix of several Win7/Centos/Ubuntu machines - to do remote development I use the following scenarios:

1. On either, ssh with console vim.
2. On linux, I'll do a fuse ssh filesystem mount and then use vim/sublime text.
3. On windows, I do an ssh tunnel & samba mount to local drive, then vim/sublime text.

Whatever I'm working on is either tunneled to a local port to access via browser, or behind http auth. 
On Fri, Jun 22, 2012 at 3:07 PM, Mark Hahn <ma...@hahnca.com> wrote:
For what it's worth, I have my only development environment on one "server" and I just remote into it from all the others.  I literally see the same exact environment everywhere.
On Fri, Jun 22, 2012 at 3:00 PM, Elijah Insua <tmp...@gmail.com> wrote:
dropbox


On Fri, Jun 22, 2012 at 2:52 PM, Ralphtheninja (Magnus Skog) <lars.mag...@gmail.com> wrote:
Hi,

It's very common that I use several machines while developing and those machines might also be in different locations. I have two machines at home and two machines at my moms etc. There might be more machines in the future. My problem is this. No matter where I am, I just want to sit down and code and not care about what modules I have installed and where. If I'm visiting my mom some day I might find this uber cool module and install it globally with npm on that machine. When I get back home I'd like to sync my global modules on my other machines, instead of having to remember that I installed module X on machine Y. Do you have any recommendations?

Thanks
/Magnus

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en



--
John R. Fitzgerald


Tim Dickinson

unread,
Jun 23, 2012, 4:18:11 PM6/23/12
to nod...@googlegroups.com
Hello github!!

Or get yourself a laptop. Your trying to have the cake and eat it too.

Tim Caswell

unread,
Jun 23, 2012, 5:35:50 PM6/23/12
to nod...@googlegroups.com
This is where the package.json file shines.  Simply define your app's dependencies in it's package.json.  Then on whatever machine you're working, getting the right dependencies is a simple `npm install` away.

This also has the added benifit of avoiding dependency issues where project A depends on f...@0.0.4, but project B depends on f...@0.2.1 and they are incompatible versions.  Globally installed dependencies have versioning issues.

I like to keep my code in the open, so I push everything to github.  I'm constantly working on a new machine (I format and install OS about weekly)  I don't have to worry about backing up my data, it's always somewhere I can find it.

Document your dependencies using package.json (hint `npm init` and `npm install --save foo` are your friends) and push your code to a central repository like github.  (If you don't want others seeing your code and don't want to pay for a premium github account, it's trivial to setup your own git repo if you have a vps somewhere).


On Sat, Jun 23, 2012 at 3:18 PM, Tim Dickinson <price...@gmail.com> wrote:
Hello github!!

Or get yourself a laptop. Your trying to have the cake and eat it too.

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to

Oliver Leics

unread,
Jun 23, 2012, 5:51:32 PM6/23/12
to nod...@googlegroups.com
On Sat, Jun 23, 2012 at 11:35 PM, Tim Caswell <t...@creationix.com> wrote:
> If you don't want others seeing your code and
> don't want to pay for a premium github account,

https://bitbucket.org/
Unlimited private repositories
Unlimited disk space
For free

John Fitzgerald

unread,
Jun 23, 2012, 11:07:54 PM6/23/12
to nod...@googlegroups.com
In more detail here's I do it; the application/project I'm working on is always hosted on a cloud CentOS machine(s), that have the git/svn checkout locally, and will run the app there. I have some install scripts that setup everything the way I like it. 

When my client is Windows, I'll use Putty and development via console Vim OR samba mount the repository directory on remote CentOS, then use Sublime Text / Vim. The latter works really well when using a local vmware image for CentOS too.

When my client is Linux, I'll use ssh and console Vim OR sshfs/fuse to mount the repository directory on remote CentOS, then Sublime/Vim again.

The reason it works well for me, is:
a) I often have non-node stuff necessary for my work like postgresql, redis, cli apps, nginx, postfix, binary content etc.. I can't install those all from scratch on every machine I want to work from.
b) I want the immediate feedback of save/refresh, so I don't like waiting for rsync or a push/pull.
c) Some modules won't work cross platform and I don't care about supporting Windows as a server (I think MS support of Node is great though).
d) This same setup works equally well for python/ruby/php apps as I can't use node exclusively.
e) My development is under the same conditions as my production environment, so deploying is generally easy.

Biggest downside is your editor may die if it doesn't cache file listings and you have a slower link/big repository.


Also, I was using ssh/putty with multitail to monitor log files while I work, but I just started trying out http://logio.org/ as a replacement - fantastic so far.



For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en



--
John R. Fitzgerald


Magnus Skog (@ralphtheninja)

unread,
Jun 24, 2012, 7:42:25 AM6/24/12
to nod...@googlegroups.com
Excellent. This setup is pretty much exactly what I'm looking for. Thanks John!

Also thanks to input from the rest of you guys.

Cheers
/Magnus
Reply all
Reply to author
Forward
0 new messages