feat: Add download manager

master
root 2022-02-24 15:20:21 +01:00
parent ee069e9ab8
commit 9268d90979
3 changed files with 9 additions and 3 deletions

View File

@ -4,4 +4,4 @@ import PackAPI from "../pack_api";
export const packRoutes = express.Router();
packRoutes.get("/packs", PackAPI.getPacks);
packRoutes.get("/getpack", PackAPI.downloadSinglePack);
packRoutes.get("/getpack", PackAPI.downloadSinglePack);

View File

@ -50,5 +50,11 @@ PackService.getInitialList().then(() => {
httpServer.listen(PORT, () =>
console.log(`The server is running on port ${PORT}`)
);
console.log('initialized with ',PackService.getPackList().length, 'packs in ', Math.round(performance.now() - start), 'ms')
console.log(
"initialized with ",
PackService.getPackList().length,
"packs in ",
Math.round(performance.now() - start),
"ms"
);
});

View File

@ -60,7 +60,7 @@ export default class PackService {
public static findByName = (name: string): Pack | undefined => {
for (let i = 0; i < PackService.packList.length; i++) {
let pack = PackService.packList[i];
if (pack.name === name) {
return pack;
}