dbdesk-studio 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -0
- package/dist/cli.js +3 -25
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# dbdesk-studio
|
|
2
|
+
|
|
3
|
+
Database management studio with a beautiful web interface. Connect, query, and manage your databases with ease.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Option 1: Use with `npx` (no installation needed)
|
|
8
|
+
```bash
|
|
9
|
+
npx dbdesk-studio
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Option 2: Install globally
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g dbdesk-studio
|
|
15
|
+
dbdesk-studio
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Option 3: Install locally
|
|
19
|
+
```bash
|
|
20
|
+
npm install dbdesk-studio
|
|
21
|
+
npx dbdesk-studio
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
After running `dbdesk-studio`, the web interface will start at `http://localhost:3000`
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
- 🗄️ Support for PostgreSQL, MySQL, and more
|
|
31
|
+
- 🎨 Modern web-based UI
|
|
32
|
+
- 📝 Interactive SQL editor
|
|
33
|
+
- 🚀 Real-time query execution
|
|
34
|
+
- 💾 Database browsing and management
|
|
35
|
+
|
|
36
|
+
## Supported Databases
|
|
37
|
+
|
|
38
|
+
- PostgreSQL
|
|
39
|
+
- MySQL
|
|
40
|
+
- SQLite (coming soon)
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Start the studio
|
|
46
|
+
dbdesk-studio
|
|
47
|
+
|
|
48
|
+
# The web interface opens automatically
|
|
49
|
+
# Default: http://localhost:9876
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Configuration
|
|
53
|
+
|
|
54
|
+
Set database connection details in the UI or use environment variables.
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|
|
59
|
+
|
|
60
|
+
## Repository
|
|
61
|
+
|
|
62
|
+
[github.com/zexahq/dbdesk-studio](https://github.com/zexahq/dbdesk-studio)
|
package/dist/cli.js
CHANGED
|
@@ -94,7 +94,6 @@ function startBackend(config) {
|
|
|
94
94
|
const useTs = serverPath.endsWith('.ts');
|
|
95
95
|
const args = useTs ? [serverPath] : [];
|
|
96
96
|
const cmd = useTs ? 'tsx' : 'node';
|
|
97
|
-
console.log(`🚀 Starting backend on port ${config.backendPort}...`);
|
|
98
97
|
const env = {
|
|
99
98
|
...process.env,
|
|
100
99
|
PORT: String(config.backendPort),
|
|
@@ -102,7 +101,7 @@ function startBackend(config) {
|
|
|
102
101
|
};
|
|
103
102
|
const backend = spawn(cmd, args, {
|
|
104
103
|
env,
|
|
105
|
-
stdio: '
|
|
104
|
+
stdio: 'ignore'
|
|
106
105
|
});
|
|
107
106
|
backend.on('error', (err) => {
|
|
108
107
|
console.error('❌ Failed to start backend:', err.message);
|
|
@@ -110,7 +109,6 @@ function startBackend(config) {
|
|
|
110
109
|
});
|
|
111
110
|
// Give backend time to start
|
|
112
111
|
setTimeout(() => {
|
|
113
|
-
console.log(`✅ Backend started on port ${config.backendPort}`);
|
|
114
112
|
resolve();
|
|
115
113
|
}, 2000);
|
|
116
114
|
});
|
|
@@ -118,7 +116,6 @@ function startBackend(config) {
|
|
|
118
116
|
function startFrontend(config) {
|
|
119
117
|
return new Promise((resolve, reject) => {
|
|
120
118
|
const webDistPath = getWebDistPath();
|
|
121
|
-
console.log(`🚀 Starting frontend on port ${config.frontendPort}...`);
|
|
122
119
|
// Create a simple HTTP server to serve static files
|
|
123
120
|
const serverScript = `
|
|
124
121
|
const http = require('http');
|
|
@@ -160,9 +157,7 @@ const server = http.createServer((req, res) => {
|
|
|
160
157
|
});
|
|
161
158
|
});
|
|
162
159
|
|
|
163
|
-
server.listen(port, () => {
|
|
164
|
-
console.log('✅ Frontend started on port ' + port);
|
|
165
|
-
});
|
|
160
|
+
server.listen(port, () => {});
|
|
166
161
|
`;
|
|
167
162
|
const frontendServer = spawn('node', ['-e', serverScript], {
|
|
168
163
|
stdio: 'inherit'
|
|
@@ -172,36 +167,19 @@ server.listen(port, () => {
|
|
|
172
167
|
reject(err);
|
|
173
168
|
});
|
|
174
169
|
setTimeout(() => {
|
|
175
|
-
console.log(`🌐 Open http://localhost:${config.frontendPort} in your browser`);
|
|
176
170
|
resolve();
|
|
177
171
|
}, 1000);
|
|
178
172
|
});
|
|
179
173
|
}
|
|
180
174
|
async function main() {
|
|
181
175
|
const config = parseArgs();
|
|
182
|
-
console.log(`
|
|
183
|
-
╔═══════════════════════════════════════════╗
|
|
184
|
-
║ dbdesk-studio v0.0.1 ║
|
|
185
|
-
║ Database Management Studio ║
|
|
186
|
-
╚═══════════════════════════════════════════╝
|
|
187
|
-
`);
|
|
188
|
-
console.log('Configuration:');
|
|
189
|
-
console.log(` Backend Port: ${config.backendPort}`);
|
|
190
|
-
console.log(` Frontend Port: ${config.frontendPort}`);
|
|
191
|
-
console.log(` Backend URL: ${config.backendUrl}`);
|
|
192
|
-
console.log('');
|
|
193
176
|
try {
|
|
194
177
|
// Start both services
|
|
195
178
|
await Promise.all([
|
|
196
179
|
startBackend(config),
|
|
197
180
|
startFrontend(config)
|
|
198
181
|
]);
|
|
199
|
-
console.log(
|
|
200
|
-
console.log('🎉 All services started successfully!');
|
|
201
|
-
console.log(`📖 Frontend: http://localhost:${config.frontendPort}`);
|
|
202
|
-
console.log(`🔌 Backend: http://localhost:${config.backendPort}`);
|
|
203
|
-
console.log('');
|
|
204
|
-
console.log('Press Ctrl+C to stop all services');
|
|
182
|
+
console.log(`dbdesk-studio running at http://localhost:${config.frontendPort}`);
|
|
205
183
|
}
|
|
206
184
|
catch (err) {
|
|
207
185
|
console.error('❌ Failed to start services:', err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbdesk-studio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Database management studio with a web interface",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -35,4 +35,4 @@
|
|
|
35
35
|
"type": "git",
|
|
36
36
|
"url": "https://github.com/zexahq/dbdesk-studio.git"
|
|
37
37
|
}
|
|
38
|
-
}
|
|
38
|
+
}
|