canvas-aws-prebuilt
v2.0.2
Published
Adapted version of node-canvas to use with AWS and Serverless
Downloads
11
Maintainers
Readme
canvas-aws-prebuilt
##Adapted version of node-canvas to use with AWS and Serverless.
Important note: currently this module is using node-canvas v1.6.7
. Support of v2
may be added later.
Installation
Download the package:
npm install --save canvas-aws-prebuilt
Serverless
If you're using serverless-webpack, you'll need node-loader to load canvas.node
. (Isn't needed if you're also using webpack-node-externals).
Usage
Replace require('canvas')
with require('canvas-aws-prebuilt')
.
API
See node-canvas API.
FAQ
Can I use this in other environments (Windows, MacOS etc.)?
No, you're probably looking for node-canvas-prebuilt.
The Reason
I spent some time (a week, actually) trying to deploy a Serverless application with node-canvas, so I decided to make life easier for those who try to do the same.
Thanks
- Automattic for making such a wonderful library;
- WebSeed for his node-canvas-aws-lambda-example which gave me the inspiration;
- anandanand84 for his how-dependencies-were-created (I slightly modified it and used to build the libs);
- mankins for his guide (really helped me to find the solution);
- eonarheim for this comment from which I learned how to make the executable to search for libs in its current folder.
License
MIT