forked from cory/tildefriends
Add a runtime switch between httpd implementions. One of which is totally not hooked up yet.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4685 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -952,8 +952,9 @@ function stringResponse(response, data) {
|
||||
}
|
||||
|
||||
loadSettings().then(function() {
|
||||
httpd.all("/login", auth.handler);
|
||||
httpd.all("", function(request, response) {
|
||||
let httpd_impl = (tildefriends.args.httpdc ? httpdc : httpd);
|
||||
httpd_impl.all("/login", auth.handler);
|
||||
httpd_impl.all("", function(request, response) {
|
||||
let match;
|
||||
if (request.uri === "/" || request.uri === "") {
|
||||
try {
|
||||
@ -1003,7 +1004,8 @@ loadSettings().then(function() {
|
||||
return response.end(data);
|
||||
}
|
||||
});
|
||||
httpd.registerSocketHandler("/app/socket", app.socket);
|
||||
httpd_impl.registerSocketHandler("/app/socket", app.socket);
|
||||
httpd_impl.start();
|
||||
}).catch(function(error) {
|
||||
print('Failed to load settings.');
|
||||
printError({print: print}, error);
|
||||
|
Reference in New Issue
Block a user