# svg-autocrop-serverless **Repository Path**: cncf/svg-autocrop-serverless ## Basic Information - **Project Name**: svg-autocrop-serverless - **Description**: πŸš—πŸŒ½πŸ”³πŸ’β€β™€οΈπŸ™…β€β™€οΈπŸ’β€β™‚οΈπŸ™…β€β™‚οΈServerless infrastructure for SVG Autocrop - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-07-25 - **Last Updated**: 2025-06-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README What is this: A repo for a serverless (gcloud functions) api of svg-autocrop. Install: npm install, at this moment a nodejs v10 is used Debug locally: functions-framework --target=autocrop1 where autocrop1 is a function name from an index.js Deploy: gcloud functions deploy --runtime=nodejs10 --region=us-central1 --trigger-http autocrop1 # Example API Usage: ``` const baseUrl = 'https://us-central1-cncf-svg-autocrop.cloudfunctions.net/autocrop'; const rp = require('request-promise'); const input = require('fs').readFileSync(`node_modules/svg-autocrop/fixtures/f5.input.svg`, 'utf-8'); const response = await rp({ method: 'POST', body: {"svg": input, title: "new title"}, uri: baseUrl, json: true }); console.info(response); ``` output: `{ success : true, result: '