Removing commander dependency

This commit is contained in:
Mattias Erming 2014-03-24 12:30:28 +01:00
parent 72dcf94e41
commit b298681b4e
4 changed files with 6 additions and 15 deletions

View File

@ -1,4 +1,5 @@
module.exports = {
port: 9000,
nick: "temp_name",
fullname: "Temporary Name",
autoConnect: true,

View File

@ -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 =
new (require("./lib/server.js"))()
.listen(PORT);
.listen();

View File

@ -12,11 +12,11 @@ function Server() {
this.networks = new models.NetworkCollection;
}
Server.prototype.listen = function(port) {
Server.prototype.listen = function() {
var self = this;
var http = connect()
.use(connect.static("client"))
.listen(port);
.listen(config.port);
this.networks.on("all", function(action, data) {
this.sockets.emit(action, data);

View File

@ -1,6 +1,6 @@
{
"name": "chat",
"description": "A web-based client/server IRC chat",
"description": "Web client/server IRC chat",
"version": "0.1.0",
"author": {
"name": "Mattias Erming",
@ -8,7 +8,6 @@
},
"dependencies": {
"backbone": "1.1.2",
"commander": "2.1.0",
"connect": "2.13.0",
"irc": "0.3.6",
"lodash": "2.4.1",
@ -24,7 +23,7 @@
],
"main": "./index.js",
"scripts": {
"start": "nodemon index.js -p 9000"
"start": "nodemon index.js"
},
"repository": {
"type": "git",