import { createSwiApp, API_PREFIX } from "./app.js";

const PORT = Number(process.env.PORT || process.env.APP_PORT || 5002);

createSwiApp().listen(PORT, () => {
  console.log(`SWI API listening on port ${PORT}`);
  console.log(`  Health: GET ${API_PREFIX}/health`);
  console.log(`  Login:  POST ${API_PREFIX}/auth/login`);
  console.log(`  CRUD:   ${API_PREFIX}/<table> (Bearer JWT)`);
});
