From version 1.0.0, each function has the `onError` as a callback, doesn't throw the error anymore.
yarn add fincode
- Create
.env
file - Create
FINCODE_PK
andFINCODE_SK
in.env
file - Create
index.ts
and use this lines - Enjoy it <3
import { config } from 'dotenv';
config(); // config env
import { FincodeService } from "fincode";
const main = async () => {
FincodeService.i.config({
secretKey: process.env.FINCODE_SK,
publicKey: process.env.FINCODE_PK
});
const customerCreated = await FincodeService.i.postCustomers({
email: CUSTOMER_EMAIL,
name: CUSTOMER_NAME,
});
console.log(customerCreated);
}
main();
see
example/client-server/app