Serve a frontend through Ditto
This commit is contained in:
parent
82c4f0827e
commit
8a9f8454bf
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
|
@ -9,6 +9,7 @@ import {
|
||||||
type HonoEnv,
|
type HonoEnv,
|
||||||
logger,
|
logger,
|
||||||
type MiddlewareHandler,
|
type MiddlewareHandler,
|
||||||
|
serveStatic,
|
||||||
} from '@/deps.ts';
|
} from '@/deps.ts';
|
||||||
import '@/firehose.ts';
|
import '@/firehose.ts';
|
||||||
|
|
||||||
|
@ -155,6 +156,10 @@ app.get('/api/v1/markers', emptyObjectController);
|
||||||
app.get('/api/v1/conversations', emptyArrayController);
|
app.get('/api/v1/conversations', emptyArrayController);
|
||||||
app.get('/api/v1/lists', emptyArrayController);
|
app.get('/api/v1/lists', emptyArrayController);
|
||||||
|
|
||||||
|
app.get('/packs/*', serveStatic({ root: './public/' }));
|
||||||
|
app.get('/instance/*', serveStatic({ root: './public/' }));
|
||||||
|
app.get('*', serveStatic({ path: './public/index.html' }));
|
||||||
|
|
||||||
app.get('/', indexController);
|
app.get('/', indexController);
|
||||||
|
|
||||||
export default app;
|
export default app;
|
||||||
|
|
|
@ -7,7 +7,7 @@ export {
|
||||||
HTTPException,
|
HTTPException,
|
||||||
type MiddlewareHandler,
|
type MiddlewareHandler,
|
||||||
} from 'https://deno.land/x/hono@v3.3.4/mod.ts';
|
} from 'https://deno.land/x/hono@v3.3.4/mod.ts';
|
||||||
export { cors, logger } from 'https://deno.land/x/hono@v3.3.4/middleware.ts';
|
export { cors, logger, serveStatic } from 'https://deno.land/x/hono@v3.3.4/middleware.ts';
|
||||||
export { z } from 'https://deno.land/x/zod@v3.21.4/mod.ts';
|
export { z } from 'https://deno.land/x/zod@v3.21.4/mod.ts';
|
||||||
export { Author, RelayPool } from 'https://dev.jspm.io/nostr-relaypool@0.6.28';
|
export { Author, RelayPool } from 'https://dev.jspm.io/nostr-relaypool@0.6.28';
|
||||||
export {
|
export {
|
||||||
|
|
Loading…
Reference in New Issue