forked from cory/tildefriends
require -> import
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3904 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
23
core/core.js
23
core/core.js
@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var auth = require("auth");
|
||||
var app = require("app");
|
||||
import * as auth from './auth.js';
|
||||
import * as app from './app.js';
|
||||
import * as httpd from './httpd.js';
|
||||
|
||||
var gProcessIndex = 0;
|
||||
var gProcesses = {};
|
||||
@ -559,8 +558,6 @@ function enableStats(process, enabled) {
|
||||
}
|
||||
|
||||
loadSettings().then(function() {
|
||||
var auth = require("auth");
|
||||
var httpd = require("httpd");
|
||||
httpd.all("/login", auth.handler);
|
||||
httpd.all("", function(request, response) {
|
||||
var match;
|
||||
@ -600,12 +597,14 @@ loadSettings().then(function() {
|
||||
httpd.registerSocketHandler("/app/socket", app.socket);
|
||||
}).catch(function(error) {
|
||||
print('Failed to load settings.');
|
||||
print(error);
|
||||
printError({print: print}, error);
|
||||
exit(1);
|
||||
});
|
||||
|
||||
exports.getSessionProcessBlob = getSessionProcessBlob;
|
||||
exports.invoke = invoke;
|
||||
exports.globalSettings = gGlobalSettings;
|
||||
exports.setGlobalSettings = setGlobalSettings;
|
||||
exports.enableStats = enableStats;
|
||||
export {
|
||||
gGlobalSettings as globalSettings,
|
||||
setGlobalSettings,
|
||||
enableStats,
|
||||
invoke,
|
||||
getSessionProcessBlob
|
||||
};
|
||||
|
Reference in New Issue
Block a user