Removing commander dependency
This commit is contained in:
parent
72dcf94e41
commit
b298681b4e
|
@ -1,4 +1,5 @@
|
|||
module.exports = {
|
||||
port: 9000,
|
||||
nick: "temp_name",
|
||||
fullname: "Temporary Name",
|
||||
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 =
|
||||
new (require("./lib/server.js"))()
|
||||
.listen(PORT);
|
||||
.listen();
|
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue