@@ -24,6 +24,11 @@ app.all('/llama-tools', (c) => {
24
24
return c . html ( utils . llama_ ) ;
25
25
} )
26
26
27
+ app . all ( '/dynamcicland_cognition_egnine' , ( c ) => {
28
+
29
+ return c . html ( 'soroy totodo --- see everything you like - everything there is to know - ---- -research papers and the itnerstections between them and things that could use implementation because if you see it in 4-5 different ways -then its easier to make cool stuff. () venn daigrams of ff 2 papeprs ---- -goododoogo ??? i ithoenkfla skdfnao' ) ;
30
+ } )
31
+
27
32
app . all ( '/iframe/*' , ( c ) => {
28
33
let basename = c . req . path . split ( '/' ) . pop ( )
29
34
console . log ( 'basename' , basename )
@@ -47,19 +52,7 @@ app.all('/_/DynamicHow.tsx', async (c) => {
47
52
} )
48
53
49
54
app . all ( '/' , async ( c ) => {
50
- return c . html ( `<div>
51
- <h1> hono index </h1>
52
- <div><a href="/odyssey">Robotics Odyssey</a></div>
53
- <div><a href="/llama-tools">llamatools</a></div>
54
- <div><a href="/blag">blag</a></div>
55
-
56
- <div>
57
- <li> add magic iframe -- htmx + some observable links --- grid %s
58
- <li> auto refresh like vite
59
- <li> add livekit screenshare
60
- holman
61
- </div>
62
- </div>` )
55
+ return c . html ( utills . indexPage )
63
56
} )
64
57
65
58
app . all ( '/livekit_screenshare' , async ( c ) => {
@@ -73,36 +66,25 @@ app.all('/views/*', async (c) => {
73
66
const html = fs . readFileSync ( 'src/' + c . req . path , 'utf8' )
74
67
return c . html ( html )
75
68
} )
69
+ app . post ( '/livekit_connect' , utils . livekit_connect ) ;
76
70
77
71
// app.get('/api/replay_analyzer', (c) => c.json({'Pretty Blog API': 1}));
78
72
console . log ( 'app' , 'hono' , Date . now ( ) )
79
73
80
74
//app.fire()
81
75
export default app
82
-
83
-
84
-
85
- app . post ( '/livekit_connect' , async ( c ) => {
86
- console . log ( 'livekit_connect' ) ;
87
-
88
- // Identity creation with timestamp to avoid conflicts
89
- const jsonData = { identity : 'voice to prompt?' + Date . now ( ) } ;
90
- const identity = jsonData . identity ;
91
-
92
- if ( ! identity ) {
93
- return c . text ( "Identity parameter is missing" , 400 ) ;
94
- }
95
-
96
- // Connecting to LiveKit
97
- const json = await utils . connect_to_livekit ( jsonData ) ;
98
- console . log ( 'Generated token and wsUrl:' , json ) ;
99
-
100
- return c . json ( json ) ;
101
- } ) ;
102
-
103
76
//3d css react tw
104
-
105
77
//app.get('/blag', (c) => c.json({'Pretty Blog API': 1}));
106
78
//app.get('/blag-archive', (c) => c.json({'Pretty Blog API': 1}));
107
79
//app.get('/api/magic_llama', (c) => c.json({'Pretty Blog API': 1}));
108
- //app.get('/api/measure_magic_llama', (c) => c.json({'Pretty Blog API': 1}))
80
+ //app.get('/api/measure_magic_llama', (c) => c.json({'Pretty Blog API': 1}))
81
+
82
+ app . all ( '/iframe_observablbehq' , async ( c ) => {
83
+ const response = await fetch ( 'http://127.0.0.1:3001' + c . req . path , {
84
+ method : c . req . method ,
85
+ headers : c . req . headers ,
86
+ body : c . req . method === 'POST' ? await c . req . text ( ) : null ,
87
+ } ) ;
88
+ const data = await response . text ( ) ;
89
+ return c . html ( data ) ;
90
+ } )
0 commit comments