hardlounge/app.js

33 lines
673 B
JavaScript
Raw Normal View History

2014-03-07 21:24:02 +00:00
var argv = require("commander")
2014-03-04 16:31:52 +00:00
.option("-p, --port <n>", "port to use", parseInt)
2014-03-06 15:11:25 +00:00
.parse(process.argv);
2014-03-04 16:31:52 +00:00
2014-03-06 22:36:56 +00:00
PORT = 80; // Default port
2014-03-04 16:31:52 +00:00
if (argv.port) {
PORT = argv.port;
}
2014-03-07 21:24:02 +00:00
var server =
new (require("./lib/server.js"))()
.listen(PORT);
// Temp
2014-03-09 21:22:37 +00:00
/*
2014-03-07 21:24:02 +00:00
var models = require("./lib/models.js");
var network = new models.Network({host: "irc.network.org"});
server.networks.add(network);
network.get("channels").add(new models.Channel({
name: "#foo",
messages: [
new models.Message({user: "user", text: "Hi!"}),
new models.Message({user: "user", text: ".. Hello?"}),
],
users: [
new models.User({name: "user"}),
new models.User({name: "other_user"}),
2014-03-09 21:22:37 +00:00
]:
2014-03-07 21:24:02 +00:00
}));
2014-03-09 21:22:37 +00:00
*/