Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anataliocs/nestjs-spheron-uploadtoken-server
Reference application demonstrating a Upload Token server for use with the Spheron Browser Upload SDK built with NestJS.
https://github.com/anataliocs/nestjs-spheron-uploadtoken-server
api blockchain ipfs nestjs typescript web3
Last synced: 5 days ago
JSON representation
Reference application demonstrating a Upload Token server for use with the Spheron Browser Upload SDK built with NestJS.
- Host: GitHub
- URL: https://github.com/anataliocs/nestjs-spheron-uploadtoken-server
- Owner: anataliocs
- License: mit
- Created: 2024-01-11T11:51:06.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-11T15:44:49.000Z (12 months ago)
- Last Synced: 2024-11-09T19:28:58.644Z (about 2 months ago)
- Topics: api, blockchain, ipfs, nestjs, typescript, web3
- Language: TypeScript
- Homepage: https://spheron.network/
- Size: 161 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
Reference application demonstrating a Upload Token server for use with the Spheron Browser Upload SDK built with NestJS.
If you don't already have one, (Create a Spheron account )[https://app.spheron.network/#/signup]
Check out the [Spheron Browser Upload SDK docs](https://docs.spheron.network/sdk/browser/) for more info!
After creating an account, you need to create a [Spheron Access Token](https://docs.spheron.network/rest-api/#creating-an-access-token)
## Local Build(MacOS)
Install dependencies:
```
npm install
```Create your own env file:
```
cp .env.example .env
```Then add your Access token to your `.env` file:
```
SPHERON_ACCESS_TOKEN=
```Spin up local environment (hot reloading included):
_Port set to 3001_
```
# for nest app
npm run start:dev```
Example cURL to query endpoint locally:
```
curl --location 'localhost:3001/uploadToken/test-bucket'
```Build Docker Container for running locally on MacOS:
```
docker build --platform linux/arm64 -t nestjs-spheron-uploadtoken-server .
```## Spheron Build
Build Docker Container for running on a [Spheron Compute Cluster](https://docs.spheron.network/compute/)
```
docker build --platform linux/amd64 -t nestjs-spheron-uploadtoken-server .
```Push to DockerHub
```
docker tag nestjs-spheron-uploadtoken-serverlatest chrisaspheron/nestjs-spheron-uploadtoken-server:latest
docker push chrisaspheron/nestjs-spheron-uploadtoken-server:latest
```## Support
Contact [email protected] for questions!