Removing commander dependency
This commit is contained in:
parent
72dcf94e41
commit
b298681b4e
@ -1,4 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
port: 9000,
|
||||||
nick: "temp_name",
|
nick: "temp_name",
|
||||||
fullname: "Temporary Name",
|
fullname: "Temporary Name",
|
||||||
autoConnect: true,
|
autoConnect: true,
|
||||||
|
11
index.js
11
index.js
@ -1,12 +1,3 @@
|
|||||||
var argv = require("commander")
|
|
||||||
.option("-p, --port <n>", "port to use", parseInt)
|
|
||||||
.parse(process.argv);
|
|
||||||
|
|
||||||
PORT = 80; // Default port
|
|
||||||
if (argv.port) {
|
|
||||||
PORT = argv.port;
|
|
||||||
}
|
|
||||||
|
|
||||||
var server =
|
var server =
|
||||||
new (require("./lib/server.js"))()
|
new (require("./lib/server.js"))()
|
||||||
.listen(PORT);
|
.listen();
|
@ -12,11 +12,11 @@ function Server() {
|
|||||||
this.networks = new models.NetworkCollection;
|
this.networks = new models.NetworkCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
Server.prototype.listen = function(port) {
|
Server.prototype.listen = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var http = connect()
|
var http = connect()
|
||||||
.use(connect.static("client"))
|
.use(connect.static("client"))
|
||||||
.listen(port);
|
.listen(config.port);
|
||||||
|
|
||||||
this.networks.on("all", function(action, data) {
|
this.networks.on("all", function(action, data) {
|
||||||
this.sockets.emit(action, data);
|
this.sockets.emit(action, data);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "chat",
|
"name": "chat",
|
||||||
"description": "A web-based client/server IRC chat",
|
"description": "Web client/server IRC chat",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Mattias Erming",
|
"name": "Mattias Erming",
|
||||||
@ -8,7 +8,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"backbone": "1.1.2",
|
"backbone": "1.1.2",
|
||||||
"commander": "2.1.0",
|
|
||||||
"connect": "2.13.0",
|
"connect": "2.13.0",
|
||||||
"irc": "0.3.6",
|
"irc": "0.3.6",
|
||||||
"lodash": "2.4.1",
|
"lodash": "2.4.1",
|
||||||
@ -24,7 +23,7 @@
|
|||||||
],
|
],
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "nodemon index.js -p 9000"
|
"start": "nodemon index.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user