https://github.com/softwaremill/sakiewka-crypto-local
https://github.com/softwaremill/sakiewka-crypto-local
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/softwaremill/sakiewka-crypto-local
- Owner: softwaremill
- Created: 2018-07-25T10:13:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T17:09:57.000Z (over 2 years ago)
- Last Synced: 2025-01-18T06:42:44.186Z (about 1 year ago)
- Language: TypeScript
- Size: 2.67 MB
- Stars: 0
- Watchers: 9
- Forks: 1
- Open Issues: 43
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sakiewka-crypto-local
Local api.
### Usage:
Run:
1. `npm ci`
2. `npm run build`
Api documentation is available at `/api/docs`
### package.json modification:
Do not modify package.lock manually. Always use `npm install` when adding or updating packages.
Especially use `npm install` when updating sakiewka-crypto like below:
`npm install softwaremill/sakiewka-crypto#${commitHash}`
##### Tests:
To run integration tests you have to specify `BACKEND_API_URL` in `.env` file.
`npm test` - Runs all tests
`npm run watch-test` - Runs tests in watch mode
##### Build:
`npm run build` - Builds .ts files into dist/ folder
##### Local api:
`npm run start` - Runs local server.
`npm run serve-debug` - Runs local server in debug mode.
`npm run watch-debug` - Runs local server and watches files for changes.
##### Swagger:
To regenerate swagger from tapir definitions run `npm run generateSwagger` and commit changes to repository.
This is not automated cause running sbt from npm would require custom docker image on jenkins. We will fix it some day.
## Dev Environment
To connect with `sakiewka-api` at dev environment (https://api.dev.sakiewka.sml.io) you can run this command:
```bash
docker run -d -e BACKEND_API_URL='https://api.dev.sakiewka.sml.io/api/v1' \
-e BTC_NETWORK=regtest -p 3000:3000 softwaremill/sakiewka-crypto-local
```