Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Cli should provide a way to be configured with a JSON options file #305

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
6 participants

rakyll commented Jun 27, 2012

Options are initialized with forever.json file on source directory is present and extended with cli options.

+1

rakyll commented Jul 9, 2012

Not necessarily with forever.json on sourceDir but ability configure via JSON would be nice.

zxqfox commented Sep 18, 2012

+1
maybe: -c path/to/any/file-forever.json
or: --config=path/to/any/file-forever.json
or something like that...

rakyll commented Sep 18, 2012

There is a duplication of work while trying to configure a fork for forever.load and shell, anything removes this duplication is ok.

zxqfox commented Sep 18, 2012

Sorry, did you see these options?

    list                List all running forever scripts
    config              Lists all forever user configuration
    set <key> <val>     Sets the specified forever config <key>
    clear <key>         Clears the specified forever config <key>

I don't really know where forever storing their default config file, but that format can be better than list of options. imho.

rakyll commented Sep 18, 2012

Config file is under ~/.forever

$ cat ~/.forever/config.json
{
    "root": "/Users/burcud/.forever",
    "pidPath": "/Users/burcud/.forever/pids",
    "sockPath": "/Users/burcud/.forever/sock",
    "loglength": 100,
    "columns": [
        "uid",
        "command",
        "script",
        "forever",
        "pid",
        "logfile",
        "uptime"
    ]
}

Why we using here file with options and not the same format as default user config file?
I can suggest that it seems like something is wrong here

zxqfox commented Sep 18, 2012

Yes, yes. But you've proposed some different format based on options, didn't?

Contributor

julianduque commented Dec 28, 2013

Already implemented with ~/.forever/config.json

Thats a global config. It would be nice to specify one in an application. What if I have two node apps on the same server but need different environment variables? Something like nodemon's config.

{ 
  "execMap": {
    "js": "node --harmony"
  },
  "env": {
    "NODE_ENV": "development"
  }
}

👍 for @apriendeau's comment

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