Skip to content

Commit

Permalink
Fix run example uppy-with-companion (#3975)
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
  • Loading branch information
3 people committed Aug 16, 2022
1 parent 2db5165 commit 0a19e8e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions examples/uppy-with-companion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ This is a simple, lean example that combines the usage of @uppy/companion and up
To run this example, make sure you've correctly installed the **repository root**:

```bash
npm install
corepack yarn install
corepack yarn build
```

That will also install the dependencies for this example.

Then, again in the **repository root**, start this example by doing:

```bash
npm run example uppy-with-companion
corepack yarn workspace @uppy-example/uppy-with-companion start
```
1 change: 1 addition & 0 deletions examples/uppy-with-companion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@uppy-example/uppy-with-companion",
"version": "0.0.0",
"dependencies": {
"@uppy/companion": "workspace:*",
"body-parser": "^1.18.2",
"express": "^4.16.2",
"express-session": "^1.15.6",
Expand Down
6 changes: 3 additions & 3 deletions examples/uppy-with-companion/server/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const express = require('express')
const bodyParser = require('body-parser')
const session = require('express-session')
const companion = require('../../../packages/@uppy/companion')
const companion = require('@uppy/companion')

const app = express()

Expand All @@ -24,7 +24,7 @@ app.get('/', (req, res) => {
})

// initialize uppy
const uppyOptions = {
const companionOptions = {
providerOptions: {
drive: {
key: 'your google key',
Expand Down Expand Up @@ -53,7 +53,7 @@ const uppyOptions = {
debug: true,
}

const { app: companionApp } = companion.app(uppyOptions)
const { app: companionApp } = companion.app(companionOptions)
app.use(companionApp)

// handle 404
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10020,6 +10020,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@uppy-example/uppy-with-companion@workspace:examples/uppy-with-companion"
dependencies:
"@uppy/companion": "workspace:*"
body-parser: ^1.18.2
express: ^4.16.2
express-session: ^1.15.6
Expand Down

0 comments on commit 0a19e8e

Please sign in to comment.