TypeScript Template
Last updated
Last updated
This is a template for TypeScript Cartesi DApps. It uses node to execute the backend application. The application entrypoint is the src/index.ts
file. It is bundled with , but any bundler can be used.
The entrypoint src/index.ts
contains example code that shows all to perfrom CRUD and wallet operations using different REST api endpoints.
Ensure you have the following packages installed
20+,
and
To set up your backend here are the required steps:
Navigate to the backend directory of your created project and run the below command, ensure that your is all setup and running.
Install all required dependencies using either yarn install
or npm i
To build and run the backend ensure that you have is installed and that your docker is up and running.
To build the backend run the below command;
This will build th image. Once this is successful. The next command to run will be
This will start the local server.
The above command will start the local server with the epoch argument set to 5 seconds. You can set it to any number depending on the duration you want to wait before voucher can be executed.
To get list of addresses used for development purpose run this command;
Start nonodo
Start the backend
To learn more about building on Cartesi you can visit the and documentations.