You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Xin Wei
801caa15d3
|
8 years ago | |
---|---|---|
.. | ||
functions | 8 years ago | |
public | 8 years ago | |
.gitignore | 8 years ago | |
README.md | 8 years ago | |
firebase.json | 8 years ago |
README.md
Image Maker
This sample shows how to create various images through Functions and serve it to the client
It uses node-canvas to create a canvas environment on Node. That canvas is then used to create either a clock, sparkline chart, or sphere(s) in png format. The images are then cached on the server and sent to the client in image/png
format.
Setting up the sample
- Create a Firebase Project using the Firebase Console.
- Clone or download this repo and open the
image-maker
directory. - You must have the Firebase CLI installed. If you don't have it install it with
npm install -g firebase-tools
and then configure it withfirebase login
. - Configure the CLI locally by using
firebase use --add
and select your project in the list. - Install dependencies locally by running:
cd functions; npm install;
Deploy and test
This sample comes with a web-based UI for testing the function. To test it out:
- Deploy your project using
firebase deploy
- Open the app using
firebase open hosting:site
, this will open a browser.`
Contributing
We'd love that you contribute to the project. Before doing so please read our Contributor guide.
License
© Google, 2017. Licensed under an Apache-2 license.