@ -85,7 +85,7 @@ exports.create = async function(ctx) {
await instanceController.create(createInstCtx)
newApplication.instances.push(createInstCtx.body)
if (ctx.isDev) {
if (process.env.NODE_ENV !== "jest") {
const newAppFolder = await createEmptyAppPackage(ctx, newApplication)
await downloadExtractComponentLibraries(newAppFolder)
}
@ -27,6 +27,7 @@ exports.fetchAppComponentDefinitions = async function(ctx) {
const componentJson = require(join(
appDirectory,
componentLibrary,
"package",
"components.json"
))
@ -43,7 +43,8 @@ router
jwtSecret: env.JWT_SECRET,
useAppRootPath: true,
ctx.isDev = env.NODE_ENV !== "production" && env.NODE_ENV !== "jest"
ctx.isDev =
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "jest"
await next()
})
.use(authenticated)
@ -28,6 +28,7 @@ app.context.eventEmitter = eventEmitter
app.use(api.routes())
if (electron.app && electron.app.isPackaged) {
process.env.NODE_ENV = "production"
Sentry.init()
app.on("error", (err, ctx) => {