Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 996 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 996 Bytes

Setup

Run yarn to install dependencies. Run npm i -g netlify-cli to install Netlify command line tools.

Run npm i -D playwright for neccessary libraries for PNG generation. (This can take a long time as it downloads builds of various browser engines.)

Run npm install playwright-core playwright-aws-lambda to install project-specific dependencies on playwright (yes, I don't no either why this is so complicated.)

Development server

Run yarn server to start the development server for direct browser rendering (faster when designing and debugging). Doesn't need playwright.

Run ntl dev to start the development server for PNG generation. Requires that playwright is installed.

Example URLs

Direct rendering in browser (run yarn server): http://localhost:3000/?title=Blah

Generate PNG (run ntl dev, requires playwright installed): http://localhost:8888/.netlify/functions/create-card/?title=Blah

Deployment

Pushing to Github will auto-deploy on Netlify.