Changes to connection system to support docker
This commit is contained in:
13
package-lock.json
generated
13
package-lock.json
generated
@@ -22,6 +22,7 @@
|
|||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"crypto": "^1.0.1",
|
"crypto": "^1.0.1",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
|
"dotenv": "^16.4.7",
|
||||||
"embla-carousel-react": "^7.1.0",
|
"embla-carousel-react": "^7.1.0",
|
||||||
"express": "^4.21.2",
|
"express": "^4.21.2",
|
||||||
"is-stream": "^4.0.1",
|
"is-stream": "^4.0.1",
|
||||||
@@ -3572,6 +3573,18 @@
|
|||||||
"csstype": "^3.0.2"
|
"csstype": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/dotenv": {
|
||||||
|
"version": "16.4.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
|
||||||
|
"integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
|
||||||
|
"license": "BSD-2-Clause",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://dotenvx.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/dunder-proto": {
|
"node_modules/dunder-proto": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"crypto": "^1.0.1",
|
"crypto": "^1.0.1",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
|
"dotenv": "^16.4.7",
|
||||||
"embla-carousel-react": "^7.1.0",
|
"embla-carousel-react": "^7.1.0",
|
||||||
"express": "^4.21.2",
|
"express": "^4.21.2",
|
||||||
"is-stream": "^4.0.1",
|
"is-stream": "^4.0.1",
|
||||||
|
|||||||
@@ -349,14 +349,6 @@ function App() {
|
|||||||
handleAddHost={handleAddHost}
|
handleAddHost={handleAddHost}
|
||||||
setIsAddHostHidden={setIsAddHostHidden}
|
setIsAddHostHidden={setIsAddHostHidden}
|
||||||
/>
|
/>
|
||||||
<LoginUserModal
|
|
||||||
isHidden={isLoginUserHidden}
|
|
||||||
form={loginUserForm}
|
|
||||||
setForm={setLoginUserForm}
|
|
||||||
handleLoginUser={handleLoginUser}
|
|
||||||
setIsLoginUserHidden={setIsLoginUserHidden}
|
|
||||||
setIsCreateUserHidden={setIsCreateUserHidden}
|
|
||||||
/>
|
|
||||||
<CreateUserModal
|
<CreateUserModal
|
||||||
isHidden={isCreateUserHidden}
|
isHidden={isCreateUserHidden}
|
||||||
form={createUserForm}
|
form={createUserForm}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ if (socket === null) {
|
|||||||
? "http://localhost:8082"
|
? "http://localhost:8082"
|
||||||
: "/",
|
: "/",
|
||||||
{
|
{
|
||||||
path: "/database-socket.io/",
|
path: window.location.hostname === "localhost" ? "/" : "/database-socket.io/",
|
||||||
transports: ["websocket", "polling"],
|
transports: ["websocket", "polling"],
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ const http = require("http");
|
|||||||
const socketIo = require("socket.io");
|
const socketIo = require("socket.io");
|
||||||
const mongoose = require("mongoose");
|
const mongoose = require("mongoose");
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
|
require('dotenv').config();
|
||||||
|
|
||||||
const server = http.createServer();
|
const server = http.createServer();
|
||||||
const io = socketIo(server, {
|
const io = socketIo(server, {
|
||||||
|
|||||||
Reference in New Issue
Block a user