44 */
55
66import { Elysia } from "elysia" ;
7- import { rateLimit } from ' elysia-rate-limit' ;
7+ import { rateLimit } from " elysia-rate-limit" ;
88import { sqliteAdmin } from "../src/index.js" ;
99import { Database } from "bun:sqlite" ;
1010import { join } from "path" ;
@@ -130,9 +130,11 @@ console.log(" 📋 Tabelas: clientes, produtos, pedidos, categorias\n");
130130// ============================================
131131
132132const app = new Elysia ( )
133- . use ( rateLimit ( {
134- exclude : [ '/admin' , '/admin/*' ]
135- } ) )
133+ . use (
134+ rateLimit ( {
135+ exclude : [ "/sqlite" , "/sqlite/*" ] ,
136+ } )
137+ )
136138 // Página inicial com instruções
137139 . get ( "/" , ( ) => {
138140 return new Response (
@@ -260,7 +262,7 @@ const app = new Elysia()
260262 <div class="table-item"><i class="ti ti-tag"></i> categorias</div>
261263 </div>
262264 </div>
263- <a href="/admin /" class="btn">
265+ <a href="/sqlite /" class="btn">
264266 <i class="ti ti-external-link"></i>
265267 Abrir Painel Admin
266268 </a>
@@ -279,12 +281,12 @@ const app = new Elysia()
279281 } )
280282
281283 // Plugin SQLite
282- . use ( sqliteAdmin ( { dbPath : DB_PATH , prefix : "/admin " } ) )
284+ . use ( sqliteAdmin ( { dbPath : DB_PATH , prefix : "/sqlite " } ) )
283285
284286 . listen ( 3000 ) ;
285287
286288console . log ( "🚀 Demo rodando em: http://localhost:3000" ) ;
287- console . log ( "📊 Painel Admin em: http://localhost:3000/admin \n" ) ;
289+ console . log ( "📊 Painel Admin em: http://localhost:3000/sqlite \n" ) ;
288290console . log ( "💡 Dica: Experimente consultas SQL como:" ) ;
289291console . log ( " SELECT * FROM clientes" ) ;
290292console . log ( " SELECT * FROM produtos WHERE preco > 5000" ) ;
0 commit comments