Merge pull request #249 from andzejsp/test-url

Test url
This commit is contained in:
Saifeddine ALOUI 2023-06-02 22:03:02 +02:00 committed by GitHub
commit 8a1848ea0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 19 deletions

File diff suppressed because one or more lines are too long

2
web/dist/index.html vendored
View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GPT4All - WEBUI</title>
<script type="module" crossorigin src="/assets/index-fd7f169a.js"></script>
<script type="module" crossorigin src="/assets/index-538eeb6b.js"></script>
<link rel="stylesheet" href="/assets/index-faf1ba4a.css">
</head>
<body>

View File

@ -6,8 +6,9 @@
import { createApp } from 'vue';
import io from 'socket.io-client';
const socket = new io(import.meta.env.VITE_GPT4ALL_API );
// fixes issues when people not hosting this site on local network
const URL = process.env.NODE_ENV === "production" ? undefined : (import.meta.env.VITE_GPT4ALL_API);
const socket = new io(URL);
socket.onopen = () => {
console.log('WebSocket connection established.');