Fix various prod bugs

This commit is contained in:
pikiou
2021-11-22 05:58:18 +01:00
parent 581393f78e
commit 003ea65979
5 changed files with 11 additions and 15 deletions

View File

@@ -7,8 +7,8 @@ import logo from "../static/logo.svg"
import config from "../config"
// Import your global styles here
import "normalize.css/normalize.css"
import styles from "./styles.module.scss"
import "react-toastify/dist/ReactToastify.css"
import styles from "./styles.module.scss"
interface Route {
route: { routes: RouteConfig[] }

View File

@@ -1,9 +1,11 @@
import os from "os"
const hostname = os.hostname()
const PORT = 4000
const HOST_LOCALLY = true
export default {
PORT: 4000,
HOST: hostname === "ns3075300" ? "fo.parisestludique.fr" : "localhost",
API_URL: hostname === "ns3075300" ? "http://fo.parisestludique.fr" : "http://localhost:4000",
PORT,
HOST: HOST_LOCALLY ? "localhost" : "fo.parisestludique.fr",
API_URL:
__SERVER__ || HOST_LOCALLY
? `http://localhost:${PORT}`
: `http://fo.parisestludique.fr:${PORT}`,
}