QUANTA Documentation
  • Documentation
  • Introduction
    • Fair Trading Protocol
  • Getting Started
    • Building Source Code
    • Running Quanta Node
    • Running Quanta Wallet
    • Running on Docker
  • Testnet
    • Create account
    • Transfer ETH/ERC-20
    • Become a Block Producer
  • Guides
    • Websockets
    • Trading Bot
  • SDK
    • Javascript
  • API
    • Markets
  • Advanced
    • Issuing your own QUANTA Token
    • Deploy your own exchange on AWS
Powered by GitBook
On this page
  • S3 Setup
  • Cloudfront
  • Route53
  • That's it!

Was this helpful?

  1. Advanced

Deploy your own exchange on AWS

PreviousIssuing your own QUANTA Token

Last updated 5 years ago

Was this helpful?

QUANTA blockchain is a powerful QDEX that enables anyone to launch their own white-label exchange and earn money from transactions fees, listing and other fees. The entire repo is available to you which you can deploy in just 5 mins:

The frontend is built on react, which can be run completely client side, as a static webpage. There are several advantages to this. It requires zero infrastructure (such as nodejs, nginx, etc) to host a dynamic server. This means you can deploy to S3, and Cloudfront with zero risk of downtime.

All examples are for demo.quantadex.com, replace your domain as necessary.

S3 Setup

  1. Create a new bucket with the canonical name as your domain name, in our case, demo.quantadex.com

  2. Enable Static Hosting

  3. Enable Bucket Read

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowPublicRead",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::demo.quantadex.com/*"
        }
    ]
}

4. Enable all redirects go to the index.html . This configuration is the most important steps as it redirects are URLs to index.html, which is processed by the react router.

4. Deploy

You can either upload the entire project manually or run a script like ours to upload.

aws s3 sync --acl public-read public s3://demo.quantadex.com/public
aws s3 cp --acl public-read public/index.html  s3://demo.quantadex.com/
aws s3 sync --acl public-read public/favicon s3://demo.quantadex.com/assets/favicon

5. Verify your end point is working.

Cloudfront

Cloudfront is CDN service that can get your data closer to the your users endpoints. Also it enables you to use Amazon's free SSL service.

Create a new distribution

In Viewer Protocol Policy, redirect your http traffic to https

In distribution settings, enter your alternate domain names, and pick a custom SSL certificate. (assuming you created already)

Create custom errors redirect back to React router. Do the same for 404 and 403 errors.

When you deploy, remember to invalidate your cache. or add another line to your deployment script.

aws cloudfront create-invalidation --distribution-id 	YourDistributionId --paths "/*"

Route53

Create a new A record alias pointing to your cloudfront

That's it!

If you have additional questions, please send to partnership@quantadex.com or reach out to us on Telegram.

https://github.com/quantadex/react_quantadex