Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
fix: wrong path when builded
Browse files Browse the repository at this point in the history
  • Loading branch information
justheimsk authored Jun 5, 2024
1 parent 9e7ed62 commit 4968d95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/core/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import bodyParser from 'body-parser';
import { IBaseRoute } from './extends/BaseRoute';
import cors from 'cors';
import Gateway from './Websocket';
import path from 'path';

export default class Server {
public app = Express();
Expand All @@ -15,7 +16,7 @@ export default class Server {
}

public async initRoutes() {
const routes = await fs.readdir('src/app/routes');
const routes = await fs.readdir(path.join(__dirname, '../app/routes'));
if (routes.length) {
for (const TRoute of routes) {
const Route = await import(`../app/routes/${TRoute}`);
Expand Down

0 comments on commit 4968d95

Please sign in to comment.