@uppy/examples: update examples after recent breaking changes (#6299)

This commit is contained in:
Prakash 2026-05-18 21:03:42 +05:30 committed by GitHub
parent 5efc32a2e7
commit 622daa498c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -66,4 +66,4 @@ const server = app.listen(3020, () => {
console.log('listening on port 3020')
})
companion.socket(server)
companion.socket(server, options)

View file

@ -71,7 +71,7 @@ app.use((err, req, res) => {
res.status(500).json({ message: err.message, error: err })
})
companion.socket(app.listen(3020))
companion.socket(app.listen(3020), companionOptions)
console.log('Welcome to Companion!')
console.log(`Listening on http://0.0.0.0:${3020}`)

View file

@ -68,7 +68,10 @@ on, you call the `socket` method like so.
// ...
const server = app.listen(PORT)
companion.socket(server)
// Pass the same `options` object you passed to `companion.app(options)`
// `companion.socket` needs `options.server` to compute the external base path
// for incoming WS URLs (important behind reverse proxies).
companion.socket(server, options)
```
### Run as standalone server