1
0
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:
Flam3rboy 2021-05-31 21:01:49 +02:00
parent 5856047e3d
commit 532d7b16a1
3 changed files with 9 additions and 9 deletions

14
package-lock.json generated
View File

@ -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",

View File

@ -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",

View File

@ -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({});