Enable hot reloading of server typescript and fix error when updating app and nmot providing a name
This commit is contained in:
parent
2b7f3942d0
commit
76c42c4094
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"watch": ["src"],
|
||||
"ext": "js,ts,json",
|
||||
"ignore": ["src/**/*.spec.ts", "src/**/*.spec.js"],
|
||||
"exec": "ts-node src/index.ts"
|
||||
}
|
|
@ -18,7 +18,7 @@
|
|||
"dev:stack:up": "node scripts/dev/manage.js up",
|
||||
"dev:stack:down": "node scripts/dev/manage.js down",
|
||||
"dev:stack:nuke": "node scripts/dev/manage.js nuke",
|
||||
"dev:builder": "yarn run dev:stack:up && ts-node src/index.ts",
|
||||
"dev:builder": "yarn run dev:stack:up && nodemon",
|
||||
"format": "prettier --config ../../.prettierrc.json 'src/**/*.ts' --write",
|
||||
"lint": "eslint --fix src/",
|
||||
"lint:fix": "yarn run format && yarn run lint",
|
||||
|
|
|
@ -67,15 +67,18 @@ async function getAppUrlIfNotInUse(ctx) {
|
|||
let url
|
||||
if (ctx.request.body.url) {
|
||||
url = encodeURI(ctx.request.body.url)
|
||||
} else {
|
||||
} else if (ctx.request.body.name) {
|
||||
url = encodeURI(`${ctx.request.body.name}`)
|
||||
}
|
||||
url = `/${url.replace(URL_REGEX_SLASH, "")}`.toLowerCase()
|
||||
if (url) {
|
||||
url = `/${url.replace(URL_REGEX_SLASH, "")}`.toLowerCase()
|
||||
}
|
||||
if (!env.SELF_HOSTED) {
|
||||
return url
|
||||
}
|
||||
const deployedApps = await getDeployedApps(ctx)
|
||||
if (
|
||||
url &&
|
||||
deployedApps[url] != null &&
|
||||
deployedApps[url].appId !== ctx.params.appId
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue