mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
@uppy/examples: update examples after recent breaking changes (#6299)
This commit is contained in:
parent
5efc32a2e7
commit
622daa498c
3 changed files with 6 additions and 3 deletions
|
|
@ -66,4 +66,4 @@ const server = app.listen(3020, () => {
|
|||
console.log('listening on port 3020')
|
||||
})
|
||||
|
||||
companion.socket(server)
|
||||
companion.socket(server, options)
|
||||
|
|
|
|||
|
|
@ -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}`)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue