1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-19 17:21:35 +02:00

🎉 init

This commit is contained in:
Flam3rboy 2021-01-04 16:29:49 +01:00
parent a5c57b9363
commit eecbb9649f
4 changed files with 12 additions and 6 deletions

2
.vscode/launch.json vendored
View File

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

View File

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

View File

@ -1,4 +1,4 @@
import { DiscordServer } from "./Server";
const server = new DiscordServer();
const server = new DiscordServer({ port: 3000 });
server.start().catch(console.error);

9
src/test/db_test.ts Normal file
View File

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