import Dirname from "shared/dirname";
import FileLoader from "shared/file-loader";
import Game from "game";
import Website from "website";
(async () => {
await FileLoader.init(`${Dirname}/global`, async(filepath) => {
await import(filepath);
console.log(`[global] loaded ${filepath.split("\\").pop()?.split(".")[0]}`);
});
new Game().listen("localhost", 5589).then(() => console.log("Server started!")); // Node.Net TCP Server - Game
new Website().listen("localhost", 3000).then(() => console.log("Website started!")); // Next.js - Website
})();
I want to run the nextjs website like this, because i want to use the global variables on both side