modulepackage
0.0.0-20241217201146-29bd37656e59
Repository: https://github.com/d1nch8g/swap.git
Documentation: pkg.go.dev
# README
Swap - open currency exchange spot software
This projects provides access to self hosted exchange spot which can be configured under your personal needs.
Locally from repository
- In repository build npm source files into
dist
.
npm run build
- Build go source binaries (you have to have go installed on your machine):
go install github.com/go-bindata/go-bindata/go-bindata@latest
go-bindata -pkg web -o gen/web/web.go -fs -prefix "dist/" dist/...
go-bindata -pkg migr -o gen/migr/migr.go -fs -prefix "db/migrations/" db/migrations/...
- Run project locally (with database in compose):
docker compose up
go run . --port 8080 --admin "[email protected]:password" --database "postgresql://user:password@localhost:5432/db?sslmode=disable" --telegram "@test" --email-creds "[email protected]:password"
Run as go CLI
Installation:
go install github.com/d1nch8g/swap@latest
Configuration flags:
--port - Port on which to run application on
--host - Hostname, should be inintialized on production runs
--database - database connection string
--bestchange-token - token to access bestchange API
--admin - admin creds "email:password"
--email-addr - email client address
--email-port - email client port
--email-creds - email "login:password"
--telegram - telegram link
--cert-file - Cert file path (should be used for TLS)
--key-file - Key file path (should be used for TLS)
-h --help - Show this help message and exit
Minimal example (requires active postgresql database, can be started):
swap --port
Run with docker
Image:
Configuration:
PORT
- port on which program will runDATABASE
- database connection stringBESTCHANGE_TOKEN
- token to call bestchange api to receive exchanger rates infoADMIN
- user:password of main admin accountAPI_ADDR
- link to api should be self referenced api addressEMAIL_ADDRESS
- host of email addressEMAIL_CREDS
- creds for emailTELEGRAM
- telegram link @tlgCERT_FILE
- certificate fileKEY_FILE
- key file
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author