- Build the DAML models and the UI project
make build
- Start the sandbox ledger
daml start
- In a new shell, start the UI
cd ui
yarn start
This opens a browser page pointing to http://localhost:3000/#/login
. Note that the development server serves content via http and should not be exposed as is to a public-facing network.
Note that if you change your DAML models you need to run a full rebuild for the changes to propagate to your UI code:
make build
-
Login as
Alice
(case sensitive), leaving the password blank. -
You are now redirected to
http://localhost:3000/#/app/report
where you see a table with allAsset
contracts listed. -
Two choice buttons are displayed for each contract: the
Give
choice is enabled if the logged-in party is theowner
of an asset. TheAppraise
button is enabled if the logged-in user is theissuer
of the asset. -
Both choices will open a dialog to enter the required parameters. The dialog currently supports
text
,number
,date
, andselection
input types.
The Report
page is meant as an example, which you can copy and modify to your needs.
Deploying daml-ui-template
to the hosted DAML platform project:DABL is straight forward:
- Build the deployment artifacts:
make deploy
-
Log into your DABL account and create a new project and ledger.
-
Select the ledger, click on
Update .dar
in the DAML section of the app artifacts, and uploaddeploy/daml-ui-template-0.0.1.dar
. -
Select
Upload .zip
in the UI Assets section, and uploaddeploy/daml-ui-template.zip
. -
Publish the deployed UI artifact from the App UI section of the page.
-
Follow the
View Site
link in the App UI section to open your fully deployed application.