This commit is contained in:
Dennis Reimann
2023-08-24 13:46:16 +02:00
parent 0b44c36b78
commit a574c19d59
3 changed files with 3 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
const helpers = require('./helpers')
const IS_DEV = process.env.NODE_ENV === 'development'
const HOST = IS_DEV ? 'http://localhost:3000' : getBaseUrl()
const HOST = IS_DEV ? 'http://localhost:3000' : 'https://einundzwanzig.space'
const random = max => Math.floor(Math.random() * Math.floor(max))
const shuffle = arr => { for (let i = arr.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * i); const temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; }; return arr }
const formatDate = date => (new Date(date)).toISOString().replace(/T.*/, '').split('-').reverse().join('.')
@@ -20,11 +20,6 @@ const assetUrl = (path, protocol = 'https') => {
if (!url.startsWith(`${protocol}:`)) url = url.replace(/^.*:/, `${protocol}:`)
return url
}
function getBaseUrl () {
const { DEPLOY_PRIME_URL, URL } = process.env
const branchUrl = DEPLOY_PRIME_URL || URL || ''
return !branchUrl.match('master--einundzwanzig') ? branchUrl : 'https://einundzwanzig.space'
}
module.exports = {
basedir: './src/includes',