mirror of
https://github.com/strapi/strapi.git
synced 2025-10-14 17:43:01 +00:00
Fix backend URL in development mode
This commit is contained in:
parent
e90f0b5858
commit
ecc7fe0b83
@ -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