feat!: Download and extract from stream

This commit is contained in:
Lucàs
2024-09-24 14:35:30 +02:00
parent 0382499c0d
commit 5a00871319
18 changed files with 249 additions and 251 deletions
+5 -13
View File
@@ -1,17 +1,9 @@
import express from "express";
import dotenv from "dotenv";
import { createServer } from "node:http";
import { logger } from "./middlewares";
import routes from "./routes";
import Server from "./Server";
import NudgerDatasetService from "./services/dataset/NudgerDatasetService";
dotenv.config();
const app = express();
app.use(logger, routes);
const server = createServer(app);
server.listen(process.env.PORT || 8080, () => {
console.info(
`Server is running on http://localhost:${process.env.PORT || 8080}`
);
});
Promise.all([NudgerDatasetService.loadDataset()])
.then(() => new Server().start())
.catch(console.error);