mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-09 09:04:20 +02:00
Fix api url in prod bug
This commit is contained in:
parent
003ea65979
commit
02be480cca
@ -41,7 +41,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "yarn dev:build && nodemon ./public/server",
|
"dev": "yarn dev:build && nodemon ./public/server",
|
||||||
"dev:build": "cross-env NODE_ENV=development webpack --config ./webpack/server.config.ts",
|
"dev:build": "cross-env NODE_ENV=development webpack --config ./webpack/server.config.ts",
|
||||||
|
"local-start": "cross-env INTRANET_HOST=localhost node ./public/server",
|
||||||
"start": "node ./public/server",
|
"start": "node ./public/server",
|
||||||
|
"local-build": "cross-env INTRANET_HOST=localhost run-s build:*",
|
||||||
"build": "run-s build:*",
|
"build": "run-s build:*",
|
||||||
"build:server": "cross-env NODE_ENV=production webpack --config ./webpack/server.config.ts",
|
"build:server": "cross-env NODE_ENV=production webpack --config ./webpack/server.config.ts",
|
||||||
"build:client": "cross-env NODE_ENV=production webpack --config ./webpack/client.config.ts",
|
"build:client": "cross-env NODE_ENV=production webpack --config ./webpack/client.config.ts",
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
const PORT = 4000
|
const PORT = 4000
|
||||||
const HOST_LOCALLY = true
|
const HOST = process.env.INTRANET_HOST || "fo.parisestludique.fr"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
PORT,
|
PORT,
|
||||||
HOST: HOST_LOCALLY ? "localhost" : "fo.parisestludique.fr",
|
HOST: "0.0.0.0",
|
||||||
API_URL:
|
API_URL: `http://${HOST}:${PORT}`,
|
||||||
__SERVER__ || HOST_LOCALLY
|
|
||||||
? `http://localhost:${PORT}`
|
|
||||||
: `http://fo.parisestludique.fr:${PORT}`,
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user