https://github.com/dashpilot/quickstart-vercel-userbase-spaces
Add auth and saving to Digitalocean Spaces to your Vercel projects
https://github.com/dashpilot/quickstart-vercel-userbase-spaces
Last synced: 4 months ago
JSON representation
Add auth and saving to Digitalocean Spaces to your Vercel projects
- Host: GitHub
- URL: https://github.com/dashpilot/quickstart-vercel-userbase-spaces
- Owner: dashpilot
- Created: 2020-10-11T02:23:07.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-10-15T02:00:36.000Z (over 5 years ago)
- Last Synced: 2025-07-17T18:17:23.212Z (11 months ago)
- Language: HTML
- Homepage: quickstart-vercel-userbase-spaces.vercel.app
- Size: 47.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# quickstart-vercel-userbase-spaces
Vercel function to save data and images to S3/Digitalocean Spaces. Uses userbase.com for authentication. This project is similar to my other project https://github.com/dashpilot/quickstart-netlify-spaces, but for Vercel and Userbase. Contains a full example in index.html
## How To:
### 1. Deploy this repo to Vercel
Deploy this repo to Vercel using the 'Deploy to Vercel'-button below:
[](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fdashpilot%2Fquickstart-vercel-userbase-spaces&env=S3_ENDPOINT,S3_KEY,S3_SECRET,S3_BUCKET,UB_SECRET)
### 2. Add your S3 and Userbase credentials as environment variables
During the deploy, you'll be asked for the following environment variables (or add them later under settings > environment variables):
`S3_ENDPOINT`: your S3/Spaces endpoint (e.g ams3.digitaloceanspaces.com)\
`S3_KEY`: your S3/Spaces key\
`S3_SECRET`: your S3/Spaces secret\
`S3_BUCKET`: your S3/Spaces bucket\
`UB_SECRET`: your userbase.com secret key
### 3. Fill in your Userbase.com app id
Fill in your Userbase.com app id in public/index.html (just below userbase.init) and visit index.html to log in. After you've logged in, press the 'save test data'-button to test if everything works. You should now see a data.json file in your S3/Spaces bucket.
### 4. Press the :star: button
Don't forget to press the :star: button to let me know I should continue improving this project