diff --git a/api/.gitignore b/api/.gitignore index 87e56100..ef720b3f 100644 --- a/api/.gitignore +++ b/api/.gitignore @@ -1,42 +1,2 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env.local -.env.development.local -.env.test.local -.env.production.local - -# vercel -.vercel - -**/*.trace -**/*.zip -**/*.tar.gz -**/*.tgz -**/*.log -package-lock.json -**/*.bun \ No newline at end of file +node_modules +**/*.bun diff --git a/api/src/controllers/entries.ts b/api/src/controllers/entries.ts new file mode 100644 index 00000000..18d659cf --- /dev/null +++ b/api/src/controllers/entries.ts @@ -0,0 +1,2 @@ +export const EntriesController = new Elysia() + .get('/entries', () => "hello"); diff --git a/api/src/index.ts b/api/src/index.ts index 8f28d368..ed69c0b7 100644 --- a/api/src/index.ts +++ b/api/src/index.ts @@ -1,5 +1,9 @@ import { Elysia } from "elysia"; +import { swagger } from "@elysiajs/swagger"; -const app = new Elysia().get("/", () => "Hello Elysia").listen(3000); +const app = new Elysia() + .use(swagger()) + .get("/", () => "Hello Elysia") + .listen(3000); -console.log(`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`); +console.log(`Api running at ${app.server?.hostname}:${app.server?.port}`);