Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 14 days ago
JSON representation

Reference application demonstrating a Upload Token server for use with the Spheron Browser Upload SDK built with NestJS.

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!