diff options
| author | benj <benj@rse8.com> | 2026-05-01 09:36:21 +0800 |
|---|---|---|
| committer | benj <benj@rse8.com> | 2026-05-01 09:36:21 +0800 |
| commit | 850f4f826b536d913235e174dc07aef74e51bf60 (patch) | |
| tree | a2806da6c0ed5c48d21178e0c6c280d5a40ccd38 /web/api/src/dev-server.ts | |
| parent | 6605e2cc428e3bdaa174ccc432941eab8c5d61cb (diff) | |
| download | tidyindex-master.tar tidyindex-master.tar.gz tidyindex-master.tar.bz2 tidyindex-master.tar.lz tidyindex-master.tar.xz tidyindex-master.tar.zst tidyindex-master.zip | |
Diffstat (limited to 'web/api/src/dev-server.ts')
| -rw-r--r-- | web/api/src/dev-server.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/web/api/src/dev-server.ts b/web/api/src/dev-server.ts new file mode 100644 index 0000000..4ea4735 --- /dev/null +++ b/web/api/src/dev-server.ts @@ -0,0 +1,16 @@ +import { serve } from '@hono/node-server'; +import app from './index'; + +const PORT = Number(process.env.PORT ?? 5555); + +serve( + { + fetch: app.fetch, + port: PORT + }, + (info) => { + console.log( + `[tidyindex-api] listening on http://localhost:${info.port}` + ); + } +); |
