Skip to content

Commit 846c769

Browse files
committed
feat: change default prefix to /database
1 parent 469fbdd commit 846c769

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ const app = new Elysia()
4040
.use(
4141
sqliteAdmin({
4242
dbPath: 'demo.db',
43-
prefix: '/admin', // Optional: defaults to /admin
43+
prefix: '/database', // Optional: defaults to /database
4444
})
4545
)
4646
.listen(3000)
4747

4848
console.log('🦊 Server running at http://localhost:3000')
49-
console.log('📊 Admin Dashboard at http://localhost:3000/admin')
49+
console.log('📊 Admin Dashboard at http://localhost:3000/database')
5050
```
5151

52-
On first run, navigate to `/admin` (or your configured prefix) to start the onboarding wizard and configure your admin credentials.
52+
On first run, navigate to `/database` (or your configured prefix) to start the onboarding wizard and configure your admin credentials.
5353

5454
## ⚙️ Configuration
5555

@@ -60,7 +60,7 @@ These options are passed to the `sqliteAdmin` plugin at initialization.
6060
| Option | Type | Default | Description |
6161
| ------------ | ------ | ----------------------------- | --------------------------------------------------------------- |
6262
| `dbPath` | string | **Required** | Path to the SQLite database file |
63-
| `prefix` | string | `"/admin"` | URL prefix for the admin dashboard and API |
63+
| `prefix` | string | `"/database"` | URL prefix for the admin dashboard and API |
6464
| `configPath` | string | Same directory as `dbPath` | Path to save the runtime authentication config (JSON). Defaults to `sqlite-admin-config.json` in the same directory as your database file |
6565

6666
### Runtime Configuration (via UI)
@@ -100,7 +100,7 @@ The config file is automatically stored alongside your database, so both will pe
100100

101101
## 🔌 API Endpoints
102102

103-
The plugin adds the following routes under your configured `prefix` (default `/admin`):
103+
The plugin adds the following routes under your configured `prefix` (default `/database`):
104104

105105
### Authentication
106106

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ const mimeTypes = {
2222
* Plugin de administração SQLite para ElysiaJS
2323
* @param {Object} config - Configuração do plugin
2424
* @param {string} config.dbPath - Caminho para o arquivo do banco SQLite
25-
* @param {string} config.prefix - Prefixo da rota (ex: '/admin')
25+
* @param {string} config.prefix - Prefixo da rota (ex: '/database')
2626
* @param {string} config.configPath - Caminho para o arquivo de configuração de auth.
2727
* Se não especificado, será salvo no mesmo diretório do banco de dados (recomendado para persistência em ambientes cloud como Fly.io)
2828
*/
29-
export const sqliteAdmin = ({ dbPath, prefix = "/admin", configPath }) => {
29+
export const sqliteAdmin = ({ dbPath, prefix = "/database", configPath }) => {
3030
const db = new Database(dbPath);
3131
const uiPath = join(import.meta.dir, "ui", "dist");
3232

0 commit comments

Comments
 (0)