mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Setup elysia swagger
This commit is contained in:
parent
9e4076e1ea
commit
ad8673a46f
42
api/.gitignore
vendored
42
api/.gitignore
vendored
@ -1,42 +1,2 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
node_modules
|
||||||
|
|
||||||
# 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
|
**/*.bun
|
2
api/src/controllers/entries.ts
Normal file
2
api/src/controllers/entries.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export const EntriesController = new Elysia()
|
||||||
|
.get('/entries', () => "hello");
|
@ -1,5 +1,9 @@
|
|||||||
import { Elysia } from "elysia";
|
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}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user