Thursday, 8 December 2016

Installing Forever Module on an Offline Server

I was tasked 4 months ago to build a browser based Communications Console to enable the emergency services in South Africa to rapidly deploy call takers anywhere on their network and have them access Analogue and Digital Radio and Telephone circuits. I opted for a Nodejs server deployment with Socket.io for messaging and PeerJS for audio transport. Once completed, I ran into the ever so popular issue of deploying node global dependencies on a windows server without internet connection. I had a look at npm pack and npmbox, the problem was, for both of them you initially need an internet connection to install it, and the corporate rules prohibited the machine I needed to work on to have internet access.So here is what I did and I shit you not. I went into my npm directory, I found mine @ "C:\Users\MainUser\AppData\Roaming\npm" copied the entire folder to a flash drive. Installed node on the new server and copied the folder off the stick to the same directory I got it off the development machine. Opened the command prompt and typed in "forever". Low and behold, it just worked. Tested it with electron, foreverjs, npmbox, npm pack and all of them kinda just worked. I changed nothing in the windows PATH, just had NPM and NODE listed there, which was done automatically when I ran the node installer.So basically copy the roaming folder and paste it on your offline server at the same place and Bob's your uncle!Let me know if you guys have found anything easier than this, and whether it works for you or not. The internet hasn't been very helpful in this regard.

Submitted December 08, 2016 at 07:50AM by claytonb

No comments:

Post a Comment