Skip to content
This repository was archived by the owner on Jan 6, 2021. It is now read-only.

Commit 22a9c31

Browse files
committed
Change default port, passing addres by argv fixed
1 parent afabd57 commit 22a9c31

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ git clone git://github.com/sashasimkin/hook-receiver.git
1616
Usage
1717
===
1818
1. Create file {{name}}.json with config object in dir config/ below about this).
19-
2. node app.js IP:PORT (IP non-required, but if you filled port only the command must looks like `node app.js :PORT`). Defaults `IP='0.0.0.0';PORT=6666`.
19+
2. node app.js IP:PORT (IP non-required, but if you filled port only the command must looks like `node app.js :PORT`). Defaults `IP='0.0.0.0';PORT=8001`.
2020
3. Use `http://IP:PORT/{{name}}` as hook url in github, gitlab, etc.
2121

2222
Configuration:

app.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ fs.readdir(cfg_dir, function(wtf, files){
5454
});
5555

5656
//Server options
57-
if(process.argv[3]){
58-
var run_argv = process.argv[3].split(':');
57+
if(process.argv[2]){
58+
var run_argv = process.argv[2].split(':');
5959
process.env.IP = run_argv[0] || '0.0.0.0';
6060
process.env.PORT = run_argv[1];
6161
}
6262
process.env.IP = process.env.IP || '0.0.0.0';
63-
process.env.PORT = process.env.PORT || 6666;
63+
process.env.PORT = process.env.PORT || 8001;
6464

65-
// create a server
65+
//Create Server
6666
http.createServer(function(request, response) {
6767
request.url = request.url.slice(1);
6868

0 commit comments

Comments
 (0)