Skip to content

Commit

Permalink
core: frontend: warn developers if they use a bad BLUEOS_ADDRESS envi…
Browse files Browse the repository at this point in the history
…ronment variable
  • Loading branch information
Williangalvani committed Jan 17, 2024
1 parent 8b6709b commit 08df590
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/frontend/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ const { name } = require('./package.json')

process.env.PROJECT_NAME = name
process.env.VITE_BUILD_DATE = new Date().toLocaleString()
const DEFAULT_ADDRESS = 'http://blueos-avahi.local/'
const DEFAULT_ADDRESS = 'http://blueos.local/'
const SERVER_ADDRESS = process.env.BLUEOS_ADDRESS ?? DEFAULT_ADDRESS

const path = require('path')
const assert = require('assert');

// TODO: check if it works with https once we have something that does
assert.ok(SERVER_ADDRESS.startsWith('http://'), 'SERVER_ADDRESS must start with http://');

export default defineConfig({
plugins: [
Expand Down

0 comments on commit 08df590

Please sign in to comment.