Quellcode durchsuchen

Rename last remnants of uppy-server in examples

Renée Kooi vor 6 Jahren
Ursprung
Commit
6693cf252a

+ 0 - 0
examples/aws-uppy-server/.gitignore → examples/aws-companion/.gitignore


+ 0 - 0
examples/aws-uppy-server/index.html → examples/aws-companion/index.html


+ 0 - 0
examples/aws-uppy-server/main.js → examples/aws-companion/main.js


+ 1 - 1
examples/aws-uppy-server/package-lock.json → examples/aws-companion/package-lock.json

@@ -1,5 +1,5 @@
 {
-  "name": "uppy-server-aws-example",
+  "name": "uppy-companion-aws-example",
   "requires": true,
   "lockfileVersion": 1,
   "dependencies": {

+ 1 - 1
examples/aws-uppy-server/package.json → examples/aws-companion/package.json

@@ -1,6 +1,6 @@
 {
   "private": true,
-  "name": "uppy-server-aws-example",
+  "name": "uppy-companion-aws-example",
   "scripts": {
     "copy": "cp ../../packages/uppy/dist/uppy.min.css .",
     "start:client": "budo main.js:bundle.js -- -t babelify -g aliasify",

+ 2 - 2
examples/aws-uppy-server/readme.md → examples/aws-companion/readme.md

@@ -1,11 +1,11 @@
 # Uppy + AWS S3 Example
 
-This example uses uppy-server with a custom AWS S3 configuration.
+This example uses @uppy/companion with a custom AWS S3 configuration.
 Files are uploaded to a randomly named directory inside the `whatever/` directory in a bucket.
 
 ## Run it
 
-First set up the `UPPYSERVER_AWS_KEY`, `UPPYSERVER_AWS_SECRET`, `UPPYSERVER_AWS_REGION`, and `UPPYSERVER_AWS_BUCKET` environment variables for uppy-server.
+First set up the `UPPYSERVER_AWS_KEY`, `UPPYSERVER_AWS_SECRET`, `UPPYSERVER_AWS_REGION`, and `UPPYSERVER_AWS_BUCKET` environment variables for @uppy/companion.
 
 Move into this directory, then:
 

+ 3 - 3
examples/aws-uppy-server/server.js → examples/aws-companion/server.js

@@ -1,7 +1,7 @@
 const fs = require('fs')
 const path = require('path')
 const rimraf = require('rimraf')
-const uppy = require('uppy-server')
+const companion = require('../../packages/@uppy/companion')
 const app = require('express')()
 
 const DATA_DIR = path.join(__dirname, 'tmp')
@@ -47,10 +47,10 @@ process.on('exit', function () {
   rimraf.sync(DATA_DIR)
 })
 
-app.use(uppy.app(options))
+app.use(companion.app(options))
 
 const server = app.listen(3020, () => {
   console.log('listening on port 3020')
 })
 
-uppy.socket(server, options)
+companion.socket(server, options)

+ 1 - 1
examples/digitalocean-spaces/main.js

@@ -12,4 +12,4 @@ uppy.use(Dashboard, {
 })
 
 // No client side changes needed!
-uppy.use(AwsS3, { serverUrl: '/uppy-server' })
+uppy.use(AwsS3, { serverUrl: '/companion' })

+ 1 - 1
examples/digitalocean-spaces/readme.md

@@ -1,6 +1,6 @@
 # Uploading to DigitalOcean Spaces
 
-This example uses Uppy to upload files to a DigitolOcean Space. DigitalOcean Spaces has an identical API to S3, so we can use the [AwsS3](https://uppy.io/docs/aws-s3) plugin. We use uppy-server with a [custom `endpoint` configuration](./server.js#L32-L33) that points to DigitalOcean.
+This example uses Uppy to upload files to a DigitolOcean Space. DigitalOcean Spaces has an identical API to S3, so we can use the [AwsS3](https://uppy.io/docs/aws-s3) plugin. We use @uppy/companion with a [custom `endpoint` configuration](./server.js#L32-L33) that points to DigitalOcean.
 
 To try this example, first run:
 

+ 2 - 2
examples/digitalocean-spaces/server.js

@@ -2,7 +2,7 @@ const fs = require('fs')
 const path = require('path')
 const budo = require('budo')
 const router = require('router')
-const uppy = require('uppy-server')
+const companion = require('../../packages/@uppy/companion')
 
 /**
  * Environment variables:
@@ -26,7 +26,7 @@ const app = router()
 // Set up the /params endpoint that will create signed URLs for us.
 app.use(require('cors')())
 app.use(require('body-parser').json())
-app.use('/uppy-server', uppy.app({
+app.use('/companion', companion.app({
   providerOptions: {
     s3: {
       // This is the crucial part; set an endpoint template for the service you want to use.

+ 0 - 0
examples/uppy-with-server/.gitignore → examples/uppy-with-companion/.gitignore


+ 8 - 0
examples/uppy-with-companion/README.md

@@ -0,0 +1,8 @@
+# @uppy/companion example
+
+This is a simple, lean example that combines the usage of @uppy/companion and uppy client.
+
+## Test it
+
+To test it, run `npm install` to install the required dependencies, and then run `npm start`
+

+ 0 - 0
examples/uppy-with-server/client/index.html → examples/uppy-with-companion/client/index.html


+ 0 - 0
examples/uppy-with-server/output/.empty → examples/uppy-with-companion/output/.empty


+ 1 - 3
examples/uppy-with-server/package.json → examples/uppy-with-companion/package.json

@@ -17,8 +17,6 @@
     "express": "^4.16.2",
     "express-session": "^1.15.6",
     "light-server": "^2.4.0",
-    "upload-server": "^1.1.6",
-    "uppy": "^0.22.2",
-    "uppy-server": "^0.12.1"
+    "upload-server": "^1.1.6"
   }
 }

+ 3 - 3
examples/uppy-with-server/server/index.js → examples/uppy-with-companion/server/index.js

@@ -1,5 +1,5 @@
 const express = require('express')
-const uppy = require('../../../packages/@uppy/companion')
+const companion = require('../../../packages/@uppy/companion')
 const bodyParser = require('body-parser')
 const session = require('express-session')
 
@@ -54,7 +54,7 @@ const uppyOptions = {
   debug: true
 }
 
-app.use(uppy.app(uppyOptions))
+app.use(companion.app(uppyOptions))
 
 // handle 404
 app.use((req, res, next) => {
@@ -67,7 +67,7 @@ app.use((err, req, res, next) => {
   res.status(err.status || 500).json({ message: err.message, error: err })
 })
 
-uppy.socket(app.listen(3020), uppyOptions)
+companion.socket(app.listen(3020), uppyOptions)
 
 console.log('Welcome to Uppy Companion!')
 console.log(`Listening on http://0.0.0.0:${3020}`)

+ 0 - 8
examples/uppy-with-server/README.md

@@ -1,8 +0,0 @@
-# uppy-server example
-
-This is a simple, lean example that combines the usage of uppy-server and uppy client.
-
-## Test it
-
-To test it, run `npm install` to install the required dependencies, and then simply run `npm start`
-