Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PDF Generator Sample

This is a sample project to show how PDF files can be generated with PhantomJS and Puppeteer.

Provide means for rendering templates into HTML. Use PhantomJS or Puppeteer to render HTML files into PDF documents.

  • Docker
  • Node.js (prefer versions v8.9.3+)
  • Typescript

Base setup was copied from https://github.com/Microsoft/TypeScript-Node-Starter

Development

npm install
npm run dev

Each library should have types defined. If you are planning to use one without then you need to create a definitions file in src/types/. Prefer using dts-gen for that.

Testing

Jest is used for tests. Add new test files in test/ directory.

npm test

Production

npm install
npm run build
NODE_ENV=production npm start

Specificaton

Swagger spec is located in src/public/swagger.yaml.

  • Typescript models are generated by the spec
  • API models are validated by the spec

About

A sample project to demonstrate safe PDF rendering with Typescript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published