From eecbb9649f49abf09ded950911d6222d6c3d8519 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 4 Jan 2021 16:29:49 +0100 Subject: [PATCH] :tada: init --- .vscode/launch.json | 2 +- src/Server.ts | 5 +---- src/index.ts | 2 +- src/test/db_test.ts | 9 +++++++++ 4 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 src/test/db_test.ts 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) { 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();