Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nos Hs2023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Språksamlingane
stadnamn
Nos Hs2023
Commits
0427f99c
Commit
0427f99c
authored
5 years ago
by
esikkala
Browse files
Options
Downloads
Patches
Plain Diff
Add api url to config
parent
18a805c4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+0
-3
0 additions, 3 deletions
README.md
src/client/configs/config.js
+4
-0
4 additions, 0 deletions
src/client/configs/config.js
src/client/epics/index.js
+8
-2
8 additions, 2 deletions
src/client/epics/index.js
with
12 additions
and
5 deletions
README.md
+
0
−
3
View file @
0427f99c
...
@@ -26,9 +26,6 @@ Run client and server concurrently:
...
@@ -26,9 +26,6 @@ Run client and server concurrently:
## Deploy with Docker
## Deploy with Docker
Note: the Docker container is meant to run on a server (NODE_ENV=production). If you want
to run it on localhost, the API url needs to be changed in
`src/client/epics/index.js`
.
### Build
### Build
`docker build -t mmm-web-app-c .`
`docker build -t mmm-web-app-c .`
...
...
This diff is collapsed.
Click to expand it.
src/client/configs/config.js
+
4
−
0
View file @
0427f99c
export
const
rootUrl
=
''
;
export
const
publishedPort
=
3006
;
export
const
MAPBOX_ACCESS_TOKEN
=
'
pk.eyJ1IjoiZWtrb25lbiIsImEiOiJjam5vampzZ28xd2dyM3BzNXR0Zzg4azl4In0.eozyF-bBaZbA3ibhvJlJpQ
'
;
export
const
MAPBOX_ACCESS_TOKEN
=
'
pk.eyJ1IjoiZWtrb25lbiIsImEiOiJjam5vampzZ28xd2dyM3BzNXR0Zzg4azl4In0.eozyF-bBaZbA3ibhvJlJpQ
'
;
This diff is collapsed.
Click to expand it.
src/client/epics/index.js
+
8
−
2
View file @
0427f99c
...
@@ -36,10 +36,16 @@ import {
...
@@ -36,10 +36,16 @@ import {
updateFacetValuesConstrainSelf
,
updateFacetValuesConstrainSelf
,
updateLocale
updateLocale
}
from
'
../actions
'
;
}
from
'
../actions
'
;
import
{
rootUrl
,
publishedPort
}
from
'
../configs/config
'
;
// set port if running on localhost with NODE_ENV = 'production'
const
port
=
location
.
hostname
===
'
localhost
'
||
location
.
hostname
===
'
127.0.0.1
'
?
`:
${
publishedPort
}
`
:
''
;
export
const
apiUrl
=
(
process
.
env
.
NODE_ENV
===
'
development
'
)
export
const
apiUrl
=
(
process
.
env
.
NODE_ENV
===
'
development
'
)
?
'
http://localhost:3001/api/
'
?
`
http://localhost:3001
${
rootUrl
}
/api/
`
:
`
${
location
.
protocol
}
//
${
location
.
hostname
}
/api/`
;
:
`
${
location
.
protocol
}
//
${
location
.
hostname
}
${
port
}${
rootUrl
}
/api/`
;
const
backendErrorText
=
`Cannot connect to the MMM Knowledge Base. Please try again later.`
;
const
backendErrorText
=
`Cannot connect to the MMM Knowledge Base. Please try again later.`
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment