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 load = [];
|
||||
const synth = {};
|
||||
const api = {};
|
||||
|
||||
let level;
|
||||
let cacheDir;
|
||||
|
|
@ -63,6 +64,7 @@ function init(mod) {
|
|||
[ "/data/", handleData ],
|
||||
[ "/wasm/", handleWasm ]
|
||||
]));
|
||||
mod.add(fixedmap("/api/", api));
|
||||
if (debug) {
|
||||
mod.static("/src/", "src");
|
||||
mod.static("/mod/", "mod");
|
||||
|
|
@ -116,7 +118,7 @@ function loadModule(mod, dir) {
|
|||
function initModule(mod, file, dir) {
|
||||
logger.log({module: file});
|
||||
require_fresh(file)({
|
||||
api: {},
|
||||
api: api,
|
||||
adm: {
|
||||
reload: prepareScripts
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue