Compare commits
3 Commits
1e47627c27
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7dfac94a7 | ||
|
|
36d07c0e97 | ||
|
|
bc62e50e75 |
17
README.md
17
README.md
@@ -1,17 +1,18 @@
|
|||||||
# screensy-unbloated
|
# screensy-unbloated
|
||||||
|
|
||||||
Screen sharing website.
|
Screen sharing website.
|
||||||
Based on https://github.com/screensy/screensy but without a ton of bloat
|
Based on https://github.com/screensy/screensy but without docker, caddy, go webserver and other bloat
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. ```sh
|
1. ```sh
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
2. ```sh
|
||||||
cp default-config.json config.json
|
cp default-config.json config.json
|
||||||
```
|
```
|
||||||
2. Edit `config.json`
|
3. Edit `config.json`
|
||||||
3.
|
4. ```sh
|
||||||
|
npm run build
|
||||||
```sh
|
npm run start
|
||||||
npm run build
|
```
|
||||||
npm run start
|
|
||||||
```
|
|
||||||
|
|||||||
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -442,7 +442,7 @@ class Room {
|
|||||||
|
|
||||||
const secureProtocol = window.location.protocol === 'https:'
|
const secureProtocol = window.location.protocol === 'https:'
|
||||||
const protocol = secureProtocol ? 'wss' : 'ws'
|
const protocol = secureProtocol ? 'wss' : 'ws'
|
||||||
const webSocketUrl = `${protocol}://${location.host}`
|
const webSocketUrl = `${protocol}://${location.host}/ws`
|
||||||
console.log('connecting to websocket', webSocketUrl)
|
console.log('connecting to websocket', webSocketUrl)
|
||||||
this.webSocket = new WebSocket(webSocketUrl)
|
this.webSocket = new WebSocket(webSocketUrl)
|
||||||
this.webSocket.onerror = () => showPopup('websocket-connect-failed')
|
this.webSocket.onerror = () => showPopup('websocket-connect-failed')
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ function main(): void {
|
|||||||
const webServer = http.createServer((req, res) => {
|
const webServer = http.createServer((req, res) => {
|
||||||
serveHandler(req, res, {
|
serveHandler(req, res, {
|
||||||
public: 'public',
|
public: 'public',
|
||||||
|
unlisted: ['ws'],
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -30,6 +31,7 @@ function main(): void {
|
|||||||
|
|
||||||
const websocketServer = new websocket.Server({
|
const websocketServer = new websocket.Server({
|
||||||
server: webServer,
|
server: webServer,
|
||||||
|
path: '/ws',
|
||||||
})
|
})
|
||||||
|
|
||||||
const broadcastServer = new Server()
|
const broadcastServer = new Server()
|
||||||
|
|||||||
Reference in New Issue
Block a user