hacker-lobby 1.1.1 → 1.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 +12 -5
- package/package.json +1 -1
- package/src/api.js +1 -5
package/README.md
CHANGED
|
@@ -63,21 +63,28 @@ Once the installation is complete, restart your terminal application (PowerShell
|
|
|
63
63
|
|
|
64
64
|
## 🚀 How to Access Hacker Lobby
|
|
65
65
|
|
|
66
|
-
You can connect to the global chat room instantly using `npx`. There is no need to clone the repository
|
|
66
|
+
You can connect to the global chat room instantly using `npx`. There is no need to clone the repository, download files, or configure local databases.
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Simply open your terminal and run:
|
|
69
|
+
```bash
|
|
70
|
+
npx hacker-lobby
|
|
71
|
+
```
|
|
72
|
+
*This command runs the client and automatically connects to the global production server.*
|
|
73
|
+
|
|
74
|
+
### Using a Custom Server URL (Optional)
|
|
75
|
+
If you wish to connect to a custom/different backend, you can specify the `API_URL` environment variable:
|
|
69
76
|
|
|
70
77
|
* **PowerShell (Windows)**:
|
|
71
78
|
```powershell
|
|
72
|
-
$env:API_URL="https://
|
|
79
|
+
$env:API_URL="https://your-custom-backend.workers.dev"; npx hacker-lobby
|
|
73
80
|
```
|
|
74
81
|
* **Command Prompt (Windows)**:
|
|
75
82
|
```cmd
|
|
76
|
-
set API_URL=https://
|
|
83
|
+
set API_URL=https://your-custom-backend.workers.dev && npx hacker-lobby
|
|
77
84
|
```
|
|
78
85
|
* **macOS / Linux / Git Bash**:
|
|
79
86
|
```bash
|
|
80
|
-
API_URL="https://
|
|
87
|
+
API_URL="https://your-custom-backend.workers.dev" npx hacker-lobby
|
|
81
88
|
```
|
|
82
89
|
|
|
83
90
|
---
|
package/package.json
CHANGED
package/src/api.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { getToken } from './config.js';
|
|
2
2
|
|
|
3
3
|
function getApiUrl() {
|
|
4
|
-
|
|
5
|
-
if (!url) {
|
|
6
|
-
throw new Error('API_URL environment variable is missing. Please make sure you have a .env file configured locally.');
|
|
7
|
-
}
|
|
8
|
-
return url;
|
|
4
|
+
return process.env.API_URL || 'https://hacker-lobby-backend.spidozx.workers.dev';
|
|
9
5
|
}
|
|
10
6
|
|
|
11
7
|
/**
|