const { createApp } = require("./backend/app");
const { port } = require("./backend/config/env");
const { initializeDependencies } = require("./backend/services/storageService");

const app = createApp();

initializeDependencies()
  .catch((error) => {
    console.error("Startup dependency initialization failed", error);
  })
  .finally(() => {
    app.listen(port, () => {
      console.log(`Server listening on http://localhost:${port}`);
    });
  });
