fix readme

This commit is contained in:
Anton Lavrenov
2021-05-27 10:12:44 -05:00
parent e4436bace9
commit 3f2c2e5042
2 changed files with 5 additions and 11 deletions

View File

@@ -123,21 +123,14 @@ import { Blur } from 'konva/lib/filters/Blur';
### 4 NodeJS env
We are using [node-canvas](https://github.com/Automattic/node-canvas) to create canvas element.
Please check installation instructions for it. Then just run
In order to run `konva` in nodejs environment you also need to install `canvas` package manually. Konva will use it for 2d canvas API.
```bash
npm install konva-node
npm install konva canvas
```
Then in you javascript file you will need to use
```javascript
const Konva = require('konva-node');
```
See file `konva-node/demo.js` file in this repo as a sample.
# Backers
- [myposter GmbH](https://www.myposter.de/)