diff --git a/api/server.mjs b/api/server.mjs index 58061ce..eb4da68 100644 --- a/api/server.mjs +++ b/api/server.mjs @@ -2,7 +2,7 @@ import path from 'path' import { readFileSync } from 'fs' import { fileURLToPath } from 'url' -export function run(config, db, log, core, http) { +export function run(config, db, log, core, http, orgPort) { const __dirname = path.dirname(fileURLToPath(import.meta.url)) const staticPackage = path.join(__dirname,'../package.json') let packageInfo = JSON.parse(readFileSync(staticPackage)) @@ -13,7 +13,7 @@ export function run(config, db, log, core, http) { res.end() }) - let port = config.port || 4000 + let port = orgPort || 4000 server.listen(port, '0.0.0.0', function(err) { if (err) { diff --git a/index.mjs b/index.mjs index 888af29..ac92217 100644 --- a/index.mjs +++ b/index.mjs @@ -1,5 +1,5 @@ -export function start(config, db, log, core, http) { +export function start(config, db, log, core, http, port) { return import('./api/server.mjs').then(function(module) { - return module.run(config, db, log, core, http) + return module.run(config, db, log, core, http, port) }) } \ No newline at end of file diff --git a/publish.bat b/publish.bat deleted file mode 100644 index 5410f7f..0000000 --- a/publish.bat +++ /dev/null @@ -1,11 +0,0 @@ -@ECHO off -SETLOCAL EnableDelayedExpansion - -ECHO. -set /p version="Print version you wanna publish: " -ECHO. -ECHO npm version !version! -npm version !version! -ECHO git push -git push -ECHO.