re-add api endpoint
This commit is contained in:
parent
8ca0c93153
commit
f8a976ffca
1 changed files with 3 additions and 1 deletions
4
app.js
4
app.js
|
|
@ -17,6 +17,7 @@ const code = {};
|
||||||
const mods = {};
|
const mods = {};
|
||||||
const load = [];
|
const load = [];
|
||||||
const synth = {};
|
const synth = {};
|
||||||
|
const api = {};
|
||||||
|
|
||||||
let level;
|
let level;
|
||||||
let cacheDir;
|
let cacheDir;
|
||||||
|
|
@ -63,6 +64,7 @@ function init(mod) {
|
||||||
[ "/data/", handleData ],
|
[ "/data/", handleData ],
|
||||||
[ "/wasm/", handleWasm ]
|
[ "/wasm/", handleWasm ]
|
||||||
]));
|
]));
|
||||||
|
mod.add(fixedmap("/api/", api));
|
||||||
if (debug) {
|
if (debug) {
|
||||||
mod.static("/src/", "src");
|
mod.static("/src/", "src");
|
||||||
mod.static("/mod/", "mod");
|
mod.static("/mod/", "mod");
|
||||||
|
|
@ -116,7 +118,7 @@ function loadModule(mod, dir) {
|
||||||
function initModule(mod, file, dir) {
|
function initModule(mod, file, dir) {
|
||||||
logger.log({module: file});
|
logger.log({module: file});
|
||||||
require_fresh(file)({
|
require_fresh(file)({
|
||||||
api: {},
|
api: api,
|
||||||
adm: {
|
adm: {
|
||||||
reload: prepareScripts
|
reload: prepareScripts
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue