mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-17 05:24:22 +01:00
Serve a frontend through Ditto
This commit is contained in:
2
public/.gitignore
vendored
Normal file
2
public/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
type HonoEnv,
|
||||
logger,
|
||||
type MiddlewareHandler,
|
||||
serveStatic,
|
||||
} from '@/deps.ts';
|
||||
import '@/firehose.ts';
|
||||
|
||||
@@ -155,6 +156,10 @@ app.get('/api/v1/markers', emptyObjectController);
|
||||
app.get('/api/v1/conversations', 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);
|
||||
|
||||
export default app;
|
||||
|
||||
@@ -7,7 +7,7 @@ export {
|
||||
HTTPException,
|
||||
type MiddlewareHandler,
|
||||
} 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 { Author, RelayPool } from 'https://dev.jspm.io/nostr-relaypool@0.6.28';
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user