mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 13:14:06 +01:00
🐛 make server options optional
This commit is contained in:
parent
5856047e3d
commit
532d7b16a1
14
package-lock.json
generated
14
package-lock.json
generated
@ -9,7 +9,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fosscord/server-util": "^1.3.14",
|
"@fosscord/server-util": "^1.3.16",
|
||||||
"ajv": "^8.5.0",
|
"ajv": "^8.5.0",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
@ -31,9 +31,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fosscord/server-util": {
|
"node_modules/@fosscord/server-util": {
|
||||||
"version": "1.3.14",
|
"version": "1.3.16",
|
||||||
"resolved": "https://registry.npmjs.org/@fosscord/server-util/-/server-util-1.3.14.tgz",
|
"resolved": "https://registry.npmjs.org/@fosscord/server-util/-/server-util-1.3.16.tgz",
|
||||||
"integrity": "sha512-P9qQ8bc01SjhRFFjw1WF3Q4rpwb4Sn8fDwwO+jeodAzhGFD1PjhBkG2xAO1UbA8LkF8+cJ8NgLFBUGzNXJTZJQ==",
|
"integrity": "sha512-/oDDGyWllVNMb/84wzzYQ6vpwkcW+mg57ECWS5bUDQ0OhT3apdpYgQFfWxwGYgyYo6fB4gmyJh/U2bzWo6Jmeg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/jsonwebtoken": "^8.5.0",
|
"@types/jsonwebtoken": "^8.5.0",
|
||||||
"@types/mongoose-autopopulate": "^0.10.1",
|
"@types/mongoose-autopopulate": "^0.10.1",
|
||||||
@ -2084,9 +2084,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fosscord/server-util": {
|
"@fosscord/server-util": {
|
||||||
"version": "1.3.14",
|
"version": "1.3.16",
|
||||||
"resolved": "https://registry.npmjs.org/@fosscord/server-util/-/server-util-1.3.14.tgz",
|
"resolved": "https://registry.npmjs.org/@fosscord/server-util/-/server-util-1.3.16.tgz",
|
||||||
"integrity": "sha512-P9qQ8bc01SjhRFFjw1WF3Q4rpwb4Sn8fDwwO+jeodAzhGFD1PjhBkG2xAO1UbA8LkF8+cJ8NgLFBUGzNXJTZJQ==",
|
"integrity": "sha512-/oDDGyWllVNMb/84wzzYQ6vpwkcW+mg57ECWS5bUDQ0OhT3apdpYgQFfWxwGYgyYo6fB4gmyJh/U2bzWo6Jmeg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/jsonwebtoken": "^8.5.0",
|
"@types/jsonwebtoken": "^8.5.0",
|
||||||
"@types/mongoose-autopopulate": "^0.10.1",
|
"@types/mongoose-autopopulate": "^0.10.1",
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"author": "Fosscord",
|
"author": "Fosscord",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fosscord/server-util": "^1.3.14",
|
"@fosscord/server-util": "^1.3.16",
|
||||||
"ajv": "^8.5.0",
|
"ajv": "^8.5.0",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
|
@ -11,7 +11,7 @@ export class Server {
|
|||||||
public port: number;
|
public port: number;
|
||||||
public server: http.Server;
|
public server: http.Server;
|
||||||
|
|
||||||
constructor({ port, server }: { port: number; server: http.Server }) {
|
constructor({ port, server }: { port: number; server?: http.Server }) {
|
||||||
this.port = port;
|
this.port = port;
|
||||||
if (server) this.server = server;
|
if (server) this.server = server;
|
||||||
else this.server = http.createServer({});
|
else this.server = http.createServer({});
|
||||||
|
Loading…
Reference in New Issue
Block a user