1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module Gargantext.Config where
import Data.NonEmpty (NonEmpty, (:|), head)
import Gargantext.Ends
import Gargantext.Types (ApiVersion(..))
defaultBackends :: NonEmpty Array Backend
defaultBackends = local :| [prod, dev, demo]
where
prod = backend V10 "/api/" "https://v4.gargantext.org" "v4.gargantext.org"
dev = backend V10 "/api/" "https://dev.gargantext.org" "dev.gargantext.org"
demo = backend V10 "/api/" "https://demo.gargantext.org" "demo.gargantext.org"
local = backend V10 "/api/" "http://localhost:8008" "localhost"
defaultApps :: NonEmpty Array Frontend
defaultApps = relative :| [prod, dev, demo, haskell, caddy]
where
relative = frontend "/#/" "" "Relative"
prod = frontend "/#/" "https://v4.gargantext.org" "v4.gargantext.org"
dev = frontend "/#/" "https://dev.gargantext.org" "gargantext.org (dev)"
demo = frontend "/#/" "https://demo.gargantext.org" "gargantext.org (demo)"
haskell = frontend "/#/" "http://localhost:8008" "localhost.gargantext"
python = frontend "/#/" "http://localhost:8000" "localhost.python"
caddy = frontend "/#/" "http://localhost:2015" "localhost.caddy"
defaultStatics :: NonEmpty Array Frontend
defaultStatics = relative :| []
where
relative = frontend "" "/" "relative"
defaultApp :: Frontend
defaultApp = head defaultApps
defaultStatic :: Frontend
defaultStatic = head defaultStatics
defaultFrontends :: Frontends
defaultFrontends = Frontends { app: defaultApp, static: defaultStatic }