Socket
Socket
Sign inDemoInstall

simple-react-pdf-service

Package Overview
Dependencies
358
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    simple-react-pdf-service

Simple PDF React service example with Express server.


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Description

This is Simple PDF React service example with Express server.

The idea behind this module is to read the pdf file on the server side, where You have access to it and send it to the client. The client read the pdf, parse it and creates React component for You in Your browser. This is how it goes, generally.

This example uses my simple-react-pdf module and shows how to use it in the client-server architecture avoiding the Cross-Origin Resource Sharing (CORS) issue. Server has been built with Babel and Client is transformed with Browserify to be readable by browsers.

Feel free to use it as the idea-template for Your real-life applications.

Screenshot

Screenshot example (3 x Simple PDF React component):

demo

Install

npm install simple-react-pdf-service

However, in production or if you do not plan to re-build it, do not install devDependencies. See npm documentation page.

Usage - quickstart

cd node_modules/simple-react-pdf-service
npm run start-server

in other terminal window:

npm run test-firefox
Usage - other browsers

Available shorcuts for browsers:

npm run test-firefox
npm run test-chrome
npm run test-opera

If You want to test the client in Your other favorite browser, just go to the client folder:

cd node_modules/simple-react-pdf-service/client

and open index.html file in Your favorite browser.

Re-build

After making Your own changes just go to module folder (if you are not there already):

cd node_modules/simple-react-pdf-service

and run command:

npm run build

This should download all packages and build everything again. Should work :-)

License

MIT

Keywords

FAQs

Last updated on 20 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc