mirror of
https://github.com/strapi/strapi.git
synced 2025-10-13 00:52:54 +00:00
Fix backend URL in development mode
This commit is contained in:
parent
e90f0b5858
commit
ecc7fe0b83
@ -48,4 +48,4 @@
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
@ -74,6 +74,10 @@ if (isAdmin && !isSetup) {
|
||||
if (_.get(server, 'admin.build.plugins.source') === 'backend') {
|
||||
URLs.mode = 'backend';
|
||||
}
|
||||
|
||||
if (process.env.npm_lifecycle_event === 'start') {
|
||||
URLs.backend = `http://${_.get(server, 'host', 'localhost')}:${_.get(server, 'port', 1337)}`;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(`Impossible to access to ${serverConfig}`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user