Skip to content
This repository

Windows compatibility #352

Merged
merged 1 commit into from about 1 year ago

5 participants

ingmr Nick Tackes Balázs Galambosi jeffwhelpley Charlie Robbins
ingmr

On Windows there is no process.env.HOME, Windows defines USERPROFILE instead.

Unfortunately there is a bigger problem on Windows. See my comment on #337

Nick Tackes

@ingmr
I logged an issue relating to windows support and was wondering if you would weigh in on that.
I tried using your solution but it didn't resolve my issue.

Basically, whenever I start a node server with forever on windows, I am unable to get the list of running processes, and therefore, I cant administer them. I have to kill the process in order to stop a forever process.

any suggestions or input would be greatly appreciated.

thanks,
Nick

ingmr

My change does not fix the windows issue. It is only a partial fix for the path problem. The bigger issue is that forever uses unix socket files which are not available on windows. On windows you have to use named pipes instead.

More info here: http://dailyjs.com/2012/05/24/windows-and-node-4/

I have not had the time to fix this.

Charlie Robbins indexzero merged commit dc1c3f9 into from February 21, 2013
Charlie Robbins indexzero closed this February 21, 2013
jeffwhelpley

+1 There doesn't seem to be a lot of progress on the general windows compatibility issues. Any chance this will be addressed in the near future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Nov 13, 2012
ingmr use process.env.USERPROFILE as alternative to process.env.HOME (for w…
…indows)
3496b64
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/forever.js
2  lib/forever.js
@@ -40,7 +40,7 @@ forever.log.cli();
40 40
 forever.initialized  = false;
41 41
 forever.kill         = require('forever-monitor').kill;
42 42
 forever.checkProcess = require('forever-monitor').checkProcess;
43  
-forever.root         = path.join(process.env.HOME || '/root', '.forever');
  43
+forever.root         = path.join(process.env.HOME || process.env.USERPROFILE || '/root', '.forever');
44 44
 forever.config       = new nconf.File({ file: path.join(forever.root, 'config.json') });
45 45
 forever.Forever      = forever.Monitor = require('forever-monitor').Monitor;
46 46
 forever.Worker       = require('./forever/worker').Worker;
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.