Added 'shout config' command

This commit is contained in:
Mattias Erming 2014-08-18 18:53:17 -07:00
parent 5e9c032591
commit 100d3dee18
4 changed files with 24 additions and 2 deletions

View file

@ -30,6 +30,7 @@ shout
```
For more information:
```
shout --help
```
@ -40,7 +41,13 @@ shout --help
## Configuration
Open your `config.json` file and edit:
Open the `config.json` file by running:
```
shout config
```
The settings:
__port__
The default port to be used.
@ -50,6 +57,7 @@ __public__
Set to either `true|false`.
When set to `false`, a login will be required for connecting users.
## User Management
Go ahead and run `shout --help`:

View file

@ -1,7 +1,7 @@
{
"name": "shout",
"description": "A web IRC client",
"version": "0.10.4",
"version": "0.10.5",
"author": "Mattias Erming",
"preferGlobal": true,
"bin": {

13
src/cli/config.js Normal file
View file

@ -0,0 +1,13 @@
var program = require("commander");
var child = require("child_process");
program
.command("config")
.description("Open the config")
.action(function() {
child.spawn(
"sudo",
["vim", process.cwd() + "/config.json"],
{stdio: "inherit"}
);
});

View file

@ -1,6 +1,7 @@
var program = require("commander");
require("./start");
require("./config");
require("./list");
require("./add");
require("./remove");