summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-01-04 16:29:49 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-01-04 16:29:49 +0100
commiteecbb9649f49abf09ded950911d6222d6c3d8519 (patch)
tree0e79599df47bd81623eb986dba7239a3e422c434
parent:sparkles: update to use new lambert-server (diff)
downloadserver-eecbb9649f49abf09ded950911d6222d6c3d8519.tar.xz
:tada: init
-rw-r--r--.vscode/launch.json2
-rw-r--r--src/Server.ts5
-rw-r--r--src/index.ts2
-rw-r--r--src/test/db_test.ts9
4 files changed, 12 insertions, 6 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json

index 13ff7ca9..e4326afa 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json
@@ -9,7 +9,7 @@ "type": "node", "request": "launch", "name": "Launch Program", - "program": "${workspaceFolder}/dist/index.js", + "program": "${workspaceFolder}/dist/test/db_test.js", "preLaunchTask": "tsc: build - tsconfig.json", "outFiles": ["${workspaceFolder}/dist/**/*.js"] }, diff --git a/src/Server.ts b/src/Server.ts
index 39b1fa56..631ddeee 100644 --- a/src/Server.ts +++ b/src/Server.ts
@@ -1,6 +1,3 @@ -import express, { Application, Router } from "express"; -import { traverseDirectory } from "./Utils"; -import { Server as HTTPServer } from "http"; import fs from "fs/promises"; import { Server, ServerOptions } from "lambert-server"; @@ -17,7 +14,7 @@ declare global { export class DiscordServer extends Server { public options: DiscordServerOptions; - constructor(opts?: DiscordServerOptions) { + constructor(opts?: Partial<DiscordServerOptions>) { super(opts); } diff --git a/src/index.ts b/src/index.ts
index 2f8aa185..f5000a61 100644 --- a/src/index.ts +++ b/src/index.ts
@@ -1,4 +1,4 @@ import { DiscordServer } from "./Server"; -const server = new DiscordServer(); +const server = new DiscordServer({ port: 3000 }); server.start().catch(console.error); diff --git a/src/test/db_test.ts b/src/test/db_test.ts new file mode 100644
index 00000000..9d4b0072 --- /dev/null +++ b/src/test/db_test.ts
@@ -0,0 +1,9 @@ +import { r } from "rethinkdb-ts"; + +async function main() { + const connection = await r.connect({ port: 28015, host: "192.168.178.122" }); + + r.db("test"); +} + +main();