Merge branch 'tsnode' into slowcord

This commit is contained in:
Madeline
2022-02-04 20:08:13 +11:00
6 changed files with 146 additions and 109 deletions
+4 -1
View File
@@ -1,6 +1,9 @@
import { Server, traverseDirectory } from "lambert-server";
const DEFAULT_FILTER = /^([^\.].*)(?<!\.d)\.(js)$/;
//if we're using ts-node, use ts files instead of js
const extension = Symbol.for("ts-node.register.instance") in process ? "ts" : "js"
const DEFAULT_FILTER = new RegExp("^([^\.].*)(?<!\.d)\.(" + extension + ")$");
export function registerRoutes(server: Server, root: string) {
return traverseDirectory(