Skip to content

Lightweight front-end app for listing DigitalOcean Spaces object storage. Used to serve cheqd network snapshots

License

Notifications You must be signed in to change notification settings

cheqd/snapshots-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Snapshots Explorer for cheqd networks

Simple browser-based app to display contents of an S3-compatible object storage bucket. Used for snapshots.cheqd.net.

This repo is forked from awslabs/aws-js-s3-explorer to utilise DigitalOcean's Spaces object-storage offering instead of AWS S3.

Usage

To retarget this repo to a different DigitalOcean Spaces storage, change the following lines to your own endpoint using the examples below.

Line 185:

var endpoint = 'nyc1.cdn.digitaloceanspaces.com'

Line 482:

AWS.config.region = 'nyc1';

Line 658-659:

s3exp_config.Bucket = '<space-name>';
s3exp_config.Region = 'nyc1';

Deploy

The snapshots.cheqd.net microsite is auto-deployed using Cloudflare Pages using its GitHub integration. No configuration is required besides connecting your repository to Cloudflare.

CORS Settings

CORS settings need to be specified to allow the file explorer front-end to fetch and list file details.

These steps assume that the deployment has been done to Cloudflare Pages. Follow DigitalOcean's guide on defining CORS settings to set the following:

  1. Origin to https://<subdomain>.pages.dev
  2. Allowed Methods to GET and HEAD
  3. Allowed Headers to *
  4. (optional )Access Control Max Age to 7200

About

Lightweight front-end app for listing DigitalOcean Spaces object storage. Used to serve cheqd network snapshots

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Languages