# Examples for JsThemis using TypeScript

## Install
```
git clone https://github.com/cossacklabs/themis.git
cd docs/examples/ts
npm install
```

## Compile
```
npm run compile
```
The command will compile TypeScript code into Javascript.

## Run
```
node ./secure_keygen.js
node ./secure_cell.js
node ./secure_message.js enc private1 public2 message
node ./secure_message.js dec private2 public1 message
node ./secure_comparator_server.js
node ./secure_comparator_client.js
node ./secure_session_server.js
node ./secure_session_client.js
```
`private1, private2, public1, public2` is the keys which can be generated by `secure_keygen.js`

Just run command by command to see how examples work.

## Clean
```
npm run clean
```
The command will delete all compiled JS files.
