Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Try to run on Heroku #41

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "SVG to Image Proxy",
"description": "A web service to create PNGs from SVGs",
"keywords": ["svg", "png", "image", "proxy"],
"website": "https://shields.io/",
"repository": "https://github.com/badges/svg-to-iamge-proxy",
"logo": "https://raw.githubusercontent.com/badges/shields/master/frontend/images/logo.svg?sanitize=true",
"buildpacks": [
{
"url": "jontewks/puppeteer"
},
{
"url": "heroku/nodejs"
}
],
"env": {
"PUPPETEER_SKIP_CHROMIUM_DOWNLOAD": {
"value": "false"
},
"BASE_URL": {
"description": "The server that is hosting the SVGs",
"required": true
}
},
"formation": {
"web": {
"quantity": 1,
"size": "free"
}
}
}
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ let cleanup
async function setup() {
const converter = createConverter({
puppeteer: {
// args: ['--no-sandbox'],
args: chrome.args,
executablePath: await chrome.executablePath,
headless: chrome.headless,
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prettier:check": "prettier --check \"**/*.@(js|md|yml|json)\"",
"mocha": "BASE_URL=https://img.example.test mocha test.js",
"test": "run-p lint prettier:check mocha",
"start": "micro"
"start": "micro --listen tcp://0.0.0.0:${PORT-3000}"
},
"repository": "badges/svg-to-image-proxy",
"author": "Paul Melnikow",
Expand Down