https://github.com/ashleydavis/pdf-server-example
Example Node.js server that downloads a PDF file to a web app
https://github.com/ashleydavis/pdf-server-example
express expressjs javascript node nodejs pdf stream streaming streaming-response
Last synced: 8 months ago
JSON representation
Example Node.js server that downloads a PDF file to a web app
- Host: GitHub
- URL: https://github.com/ashleydavis/pdf-server-example
- Owner: ashleydavis
- License: mit
- Created: 2018-03-06T22:03:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-07T00:18:57.000Z (over 8 years ago)
- Last Synced: 2025-01-30T13:42:00.005Z (over 1 year ago)
- Topics: express, expressjs, javascript, node, nodejs, pdf, stream, streaming, streaming-response
- Language: JavaScript
- Homepage: http://bit.ly/2t2cJu2
- Size: 146 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pdf-server-example
This is an example Node.js server that can download a PDF file to the front-end web app.
Before running make sure you [download and install Node.js and npm installed](https://nodejs.org/en/download/).
Before running make sure you have bower installed as follows:
npm install -g bower
You can clone this repo as follows:
git clone https://github.com/ashleydavis/pdf-server-example
Or you can [download the zip file](https://github.com/ashleydavis/pdf-server-example/archive/master.zip) and unpack it on your PC.
After cloning please install modules:
cd pdf-server-example
npm install
cd public
bower install
You you can run it like so:
cd pdf-server-example
node index.js
Open your browser to http://localhost:3000 and you will get a web page that does a HTTP POST, retrieves the content of the PDF file and then downloads that content to a PDF file on your hard drive.
To support my work please share a link to my book [Data Wrangling with JavaScript](http://bit.ly/2t2cJu2) with your colleagues and networks.