@lokavaluto/lokapi-backend-comchain v0.1.1-alpha.202505152126
This is a backend for managing any comchain currency through LokAPI.
The latter aims at providing a simple framework for building client
app to manage currency payments. You can refer to
@lokavaluto/lokapi's doc to get more knowledge of how to use it.
Adding @lokavaluto/lokapi-backend-comchain to your project
From the root of your project:
npm install --save @lokavaluto/lokapi-backend-comchainOr better, as @lokavaluto/lokapi-backend-comchain is still in early release,
npm install --save Lokavaluto/lokapi-backend-comchain#masterTo be sure to get the latest version, relaunch this last command whenever you want to update.
Usage
You can provide this backend when subclassing LokAPI:
For instance:
import LokAPIBrowserAbstract from "@lokavaluto/lokapi-browser"
import comchain from '@lokavaluto/lokapi-backend-comchain'
class LokAPI extends LokAPIBrowserAbstract {
BackendFactories = {
comchain,
}
requestLocalPassword = async function (state: string) {
// ... your UI code to request password from user
}
requestLogin() {
// ... your UI code to request password from user
}
}
if (!process.env.VUE_APP_LOKAPI_HOST) {
throw new Error("Please specify VUE_APP_LOKAPI_HOST in '.env'")
}
if (!process.env.VUE_APP_LOKAPI_DB) {
throw new Error("Please specify VUE_APP_LOKAPI_DB in '.env'")
}
export var lokAPI = new LokAPI(
process.env.VUE_APP_LOKAPI_HOST,
process.env.VUE_APP_LOKAPI_DB,
)For usage of @lokavaluto/lokapi, please refer to
@lokavaluto/lokapi's documentation.
Developers
To get started developing and tinkering with this code, you can:
Install dependencies
npm installBuild the project
npx tsc -wLaunch tests
Tests are managed through vitest
## Run test once
npm run testNote that you can also use npx vitest command to launch tests in
watch mode.
9 months ago
1 year ago
7 months ago
9 months ago
7 months ago
9 months ago
1 year ago
7 months ago
9 months ago
9 months ago
6 months ago
1 year ago
9 months ago
7 months ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago