Skip to content

Commit

Permalink
chore: do not start ws server in prod mode
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Nov 14, 2023
1 parent 982e6f6 commit 383a59c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export default defineConfig(async ({ command, mode }) => {
process.env["VITE_DESCRIPTION"] = properties.description;
process.env["VITE_VERSION"] = properties.version;

MyWebSocketServer();
if(!production) {
MyWebSocketServer();
}

return {
base,
Expand All @@ -49,7 +51,6 @@ export default defineConfig(async ({ command, mode }) => {
function MyWebSocketServer() {
const wss = new WebSocketServer({ port: wsPort });


let timer;

let n = 0;
Expand Down

0 comments on commit 383a59c

Please sign in to comment.