You can manage your PDF files without any hosted servers.
sotrege: aws s3
authentication: facebook + aws cognito
web: github pages
This is PDF Viewer.
You can lauch your own PDF viewer without servres
- npm
- davezuko/react-redux-starter-kit (v 1.0.1)
- AWS S3
- AWS Cognito
- FacebookSDK
- Github Pages
- setup aws s3
- setup facebook for developper
- setup aws cognito
- setup this repo
- change configure
- build redux
- setup github pages
- deploy
- create bucket
- configure the bucket's CORS
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
- create your app
- fill in basic settings and advanced settings with your site url
- fill in advanced settings' [Valid OAuth redirect URIs] with your site url
- create identity pool
- fill in facebook setting with your facebook APP ID
$ git clone https://github.com/sadayuki-matsuno/pdf.git
$ cd pdf
$ npm install
more detail is here
- edit config.js
$ vim src/config/config.js
export const awsRegion = 'YOUR_S3_REGION'
export const awsIdentityPoolId = 'YOUR_COGNITO_IDENTITY_POOL_ID'
export const awsBucketName = 'YOUR_S3_BUCKET_NAME'
export const facebook = 'graph.facebook.com' // no need to change
export const fbAppId = 'YOUR_FACEBOOK_APP_ID'
export const fbScope = 'public_profile, email' // no need to change
- compile
$ NODE_ENV=production npm run compile
You can get static html files in dist
- create [YOUR_GITHUB_ACCOUNT].github.io
- create another repository named
pdf
- init git under dist
- push dist to
gh-pages
brach inpdf
repository
Now, you can access to http://[YOUR_ACCOUNT_NAME].github.io/pdf
Sadayuki Matsuno