chore: pnpm workspace — landing, api, shared
apps/landing: Next.js 16 (App Router, standalone), Tailwind 4, ESLint с запретом импорта из api. apps/api: Hono + better-sqlite3, сборка tsup, /api/health. packages/shared: исходники TS без сборки. Vitest projects.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { Hono } from 'hono';
|
||||
|
||||
export function createApp() {
|
||||
const app = new Hono();
|
||||
app.get('/api/health', (c) => c.json({ ok: true, version: process.env.APP_VERSION ?? 'dev' }));
|
||||
return app;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { serve } from '@hono/node-server';
|
||||
import { createApp } from './app.js';
|
||||
|
||||
const port = Number(process.env.PORT ?? 3001);
|
||||
serve({ fetch: createApp().fetch, port }, (info) => {
|
||||
console.log(`api listening on :${info.port}`);
|
||||
});
|
||||
Reference in New Issue
Block a user