Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
butlerx committed Oct 2, 2023
1 parent f444beb commit a99ce5f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"prom-client": "^14.0.1",
"response-time": "^2.3.2",
"sass": "^1.54.4",
"serve-static": "^1.15.0",
"socket.io": "^4.5.1",
"socket.io-client": "^4.5.1",
"toastify-js": "^1.9.1",
Expand Down Expand Up @@ -141,6 +142,7 @@
"@types/node": "^20.2.6",
"@types/parseurl": "^1.3.1",
"@types/response-time": "^2",
"@types/serve-static": "^1.15.3",
"@types/sinon": "^10.0.13",
"@types/toastify-js": "^1.9.2",
"@types/yargs": "^17.0.24",
Expand Down
14 changes: 11 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/server/socketServer/assets.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express from 'express';
import serve from 'serve-static';
import { assetsPath } from './shared/path.js';

export const trim = (str: string): string => str.replace(/\/*$/, '');
export const serveStatic = (path: string) => express.static(assetsPath(path));
export const serveStatic = (path: string) => serve(assetsPath(path));

0 comments on commit a99ce5f

Please sign in to comment.