mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-08 08:34:20 +02:00
15 lines
381 B
TypeScript
Executable File
15 lines
381 B
TypeScript
Executable File
import isNode from "detect-node"
|
|
|
|
const PROTOCOL = (typeof window !== "undefined" && window?.location?.protocol) || "http:"
|
|
const PORT = 4000 + (PROTOCOL === "https:" ? 2 : 0)
|
|
const API_URL =
|
|
__DEV__ || __LOCAL__ || isNode
|
|
? `${PROTOCOL}//localhost:${PORT}`
|
|
: `${PROTOCOL}//fo.parisestludique.fr`
|
|
|
|
export default {
|
|
PORT,
|
|
HOST: "0.0.0.0",
|
|
API_URL,
|
|
}
|