Changes to connection system to support docker
This commit is contained in:
@@ -349,14 +349,6 @@ function App() {
|
||||
handleAddHost={handleAddHost}
|
||||
setIsAddHostHidden={setIsAddHostHidden}
|
||||
/>
|
||||
<LoginUserModal
|
||||
isHidden={isLoginUserHidden}
|
||||
form={loginUserForm}
|
||||
setForm={setLoginUserForm}
|
||||
handleLoginUser={handleLoginUser}
|
||||
setIsLoginUserHidden={setIsLoginUserHidden}
|
||||
setIsCreateUserHidden={setIsCreateUserHidden}
|
||||
/>
|
||||
<CreateUserModal
|
||||
isHidden={isCreateUserHidden}
|
||||
form={createUserForm}
|
||||
|
||||
@@ -10,7 +10,7 @@ if (socket === null) {
|
||||
? "http://localhost:8082"
|
||||
: "/",
|
||||
{
|
||||
path: "/database-socket.io/",
|
||||
path: window.location.hostname === "localhost" ? "/" : "/database-socket.io/",
|
||||
transports: ["websocket", "polling"],
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ const http = require("http");
|
||||
const socketIo = require("socket.io");
|
||||
const mongoose = require("mongoose");
|
||||
const crypto = require('crypto');
|
||||
require('dotenv').config();
|
||||
|
||||
const server = http.createServer();
|
||||
const io = socketIo(server, {
|
||||
|
||||
Reference in New Issue
Block a user