mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-01 17:31:13 +00:00
Add support for env variables PRIMAL_CACHE_URL
and PRIMAL_UPLOAD_URL
.
This commit is contained in:
parent
4e73ec1822
commit
297ccf782e
@ -29,7 +29,9 @@ const onError = (error: Event) => {
|
||||
|
||||
export const connect = () => {
|
||||
if (isNotConnected()) {
|
||||
const cacheServer = localStorage.getItem('cacheServer') ??
|
||||
const cacheServer =
|
||||
localStorage.getItem('cacheServer') ||
|
||||
import.meta.env.PRIMAL_CACHE_URL ||
|
||||
'wss://cache3.primal.net/cache17';
|
||||
|
||||
setSocket(new WebSocket(cacheServer));
|
||||
|
@ -29,7 +29,8 @@ const onError = (error: Event) => {
|
||||
|
||||
export const connect = () => {
|
||||
if (isNotConnected()) {
|
||||
const cacheServer = localStorage.getItem('uploadServer') ??
|
||||
const cacheServer = localStorage.getItem('uploadServer') ||
|
||||
import.meta.env.PRIMAL_UPLOAD_URL ||
|
||||
'wss://uploads.primal.net/v1';
|
||||
|
||||
setSocket(new WebSocket(cacheServer));
|
||||
|
@ -10,4 +10,5 @@ export default defineConfig({
|
||||
target: 'esnext',
|
||||
sourcemap: true,
|
||||
},
|
||||
envPrefix: 'PRIMAL_',
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user