This Node.js project provides a GraphQL API that allows users to convert web pages to PDF, PNG, JPEG or WEBP format by passing the URL of the target web page.
git clone https://github.com/michalszc/PageRenderAPI.git
cd PageRenderAPI
npm install
PGUSER=user
PGPASSWORD=password
PGHOST=127.0.0.1
PGPORT=5432
PGDATABASE=render
AWS_BUCKET=bucket
AWS_REGION=eu-central-1
AWS_ACCESS_KEY=access
AWS_SECRET_KEY=secret
AWS_S3_ENDPOINT=http://127.0.0.1:4566 # if using Localstack
# Build and run project
npm run start
# Build the project, run it and watch for changes
npm run watch
# lint code with ESLint
npm run lint
# try to fix ESLint errors
npm run lint:fix
# run all tests with jest
npm run test
# run all tests and report coverage information
npm run test:coverage
# run lint and tests
npm run validate
# run container in development (run only services - postgres and s3 on localstack)
npm run docker:dev
# run container (services + this application)
npm run docker:start