mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 19:52:36 +01:00
🎉 init
This commit is contained in:
parent
a5c57b9363
commit
eecbb9649f
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -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"]
|
||||
},
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
9
src/test/db_test.ts
Normal 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();
|
Loading…
Reference in New Issue
Block a user