Skip to content

Commit 68684cb

Browse files
committed
fix server path options
1 parent e9327b5 commit 68684cb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

server.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
var build = require('./build').build,
33
qs = require('querystring'),
44
port = 9900,
5-
repoURL = "https://github.com/cramerdev/JavaScript-Garden";
5+
repoURL = "https://github.com/cramerdev/JavaScript-Garden",
6+
options = { dir: 'doc', pathPrefix: '', template: 'garden.jade', out: 'site'};
7+
8+
// FIXME: this is done twice, once when the module loads, and once here
9+
// (with the correct options)
10+
build(options);
611

712
require('http').createServer(function (request, response) {
813
var payload = '';
@@ -16,7 +21,7 @@ require('http').createServer(function (request, response) {
1621
console.log(payload);
1722
payload = JSON.parse(qs.parse(payload).payload);
1823
if (payload.repository.url === repoURL) {
19-
build();
24+
build(options);
2025
} else {
2126
response.writeHead(400); // Bad Request
2227
}

0 commit comments

Comments
 (0)