Added port to config
This commit is contained in:
parent
47280e7490
commit
4952a11e10
@ -37,7 +37,7 @@ These are the commands currently implemented:
|
|||||||
`npm install`
|
`npm install`
|
||||||
|
|
||||||
5. Run the server
|
5. Run the server
|
||||||
`npm start` or `nodejs index.js`
|
`npm start` or `node index.js`
|
||||||
|
|
||||||
6. Open your browser
|
6. Open your browser
|
||||||
`http://localhost:9000`
|
`http://localhost:9000`
|
||||||
|
@ -182,12 +182,6 @@ $(function() {
|
|||||||
"partial": function(id) {
|
"partial": function(id) {
|
||||||
return new Handlebars.SafeString(render(id, this));
|
return new Handlebars.SafeString(render(id, this));
|
||||||
},
|
},
|
||||||
"uri": function(text) {
|
|
||||||
text = escape(text);
|
|
||||||
return URI.withinString(text, function(url) {
|
|
||||||
return "<a href='" + url.replace(/^www/, "//www") + "' target='_blank'>" + url + "</a>";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
"slice": function(items, block) {
|
"slice": function(items, block) {
|
||||||
var limit = block.hash.limit;
|
var limit = block.hash.limit;
|
||||||
var rows = $.map(items, function(i) {
|
var rows = $.map(items, function(i) {
|
||||||
@ -202,6 +196,12 @@ $(function() {
|
|||||||
}
|
}
|
||||||
html += rows.slice(-limit).join("");
|
html += rows.slice(-limit).join("");
|
||||||
return html;
|
return html;
|
||||||
}
|
},
|
||||||
|
"uri": function(text) {
|
||||||
|
text = escape(text);
|
||||||
|
return URI.withinString(text, function(url) {
|
||||||
|
return "<a href='" + url.replace(/^www/, "//www") + "' target='_blank'>" + url + "</a>";
|
||||||
|
});
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
port: 9000,
|
||||||
theme: "/themes/default.css",
|
theme: "/themes/default.css",
|
||||||
defaults: {
|
defaults: {
|
||||||
nick: "shout_user",
|
nick: "shout_user",
|
||||||
|
@ -37,10 +37,11 @@ var events = [
|
|||||||
module.exports = listen;
|
module.exports = listen;
|
||||||
|
|
||||||
function listen() {
|
function listen() {
|
||||||
|
var port = config.port || 9000;
|
||||||
var app = http()
|
var app = http()
|
||||||
.use(index)
|
.use(index)
|
||||||
.use(http.static("client"))
|
.use(http.static("client"))
|
||||||
.listen(9000);
|
.listen(port);
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
sockets = io.listen(app, {log: 0}).sockets.on("connection", function(s) {
|
sockets = io.listen(app, {log: 0}).sockets.on("connection", function(s) {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
],
|
],
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "nodejs index.js"
|
"start": "node index.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user