Skip to content

loinv226/baseapp

 
 

Repository files navigation

Go-Gin web application

This application was generated with sonic

Prerequisites

To bring up all the dependencies, run docker-compose up -Vd

Afterwards, enable the Transit engine for Vault with vault secrets enable transit

Also, you may want to run source .env to load Peatio, Barong and Sonic public keys for development use

[Optional] To load the Vault policy and create a token, follow these steps:

  1. Open config/sonic.hcl and substitute deployment_id with your actual deployment ID
  2. Run
export VAULT_ADDR=http://localhost:8200
export VAULT_TOKEN=*changeme*
vault policy write *deployment_id*_sonic config/sonic.hcl
vault token create -policy *deployment_id*_sonic -period=768h
Peatio Management Scopes
  read_engines:
    mandatory_signers:
      - sonic
    permitted_signers:
      - sonic
  write_engines:
    mandatory_signers:
      - sonic
    permitted_signers:
      - sonic
  read_markets:
    mandatory_signers:
      - sonic
    permitted_signers:
      - sonic
  write_markets:
    mandatory_signers:
      - sonic
    permitted_signers:
      - sonic
  1. Use the resulting Vault token when running the application

How to run Sonic with a frontend

  1. Copy your frontend application source files to the client/ folder

  2. Use the Makefile:

make asset

This will run the build command in client/ and move the build output to public/assets/.

Warning: Make sure to build your client (frontend) into the build/ folder, if it's a different folder, you must update your client (frontend) or Makefile

  1. Start the go server
go run app.go serve

Troubleshooting

If it doesn't work and you see the white screen, check the order of import files in index.html

About

OpenDAX Trading user interface

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 53.6%
  • TypeScript 36.9%
  • CSS 6.4%
  • JavaScript 2.3%
  • Go 0.8%
  • Dockerfile 0.0%