mirror of
https://gitlab.com/MrFry/qmining-data-editor
synced 2025-04-01 20:24:01 +02:00
removed some domain dependencies
This commit is contained in:
parent
f8d423f162
commit
b854b035c7
3 changed files with 9 additions and 41 deletions
src
|
@ -1,20 +1,9 @@
|
|||
// eslint-disable-next-line no-undef
|
||||
const useLocalhost = process && process.env.NODE_ENV === 'development'
|
||||
// eslint-disable-next-line no-undef
|
||||
const domain = process && process.env.NEXT_PUBLIC_DOMAIN
|
||||
|
||||
if (!domain && !useLocalhost) {
|
||||
throw new Error(
|
||||
'Domain is not defined! Please set NEXT_PUBLIC_DOMAIN env variable!'
|
||||
)
|
||||
}
|
||||
|
||||
const constants = {
|
||||
domain: domain || 'localhost',
|
||||
siteUrl: useLocalhost ? 'http://localhost:8080/' : `https://${domain}/`,
|
||||
apiUrl: useLocalhost
|
||||
? 'http://localhost:8080/api/'
|
||||
: `https://${domain}/api/`,
|
||||
siteUrl: useLocalhost ? 'http://localhost:8080/' : '/',
|
||||
apiUrl: useLocalhost ? 'http://localhost:8080/api/' : '/',
|
||||
maxQuestionsToRender: 250,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue