-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
58 lines (38 loc) · 2.06 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
vue init webpack client
npm install --save-dev node-sass
npm install --save-dev sass-loader
cd DocApp/old-api && python app.py
cd DocApp/old-api && C:\Users\jeremiah\AppData\Local\Programs\Python\Python36-32\python.exe app.py
CONNECTION_STRING = "dbname='DocApp' user='Superuser' host='localhost' password='pickles48'"
pip3 install flask
pip3 install flask-restful
pip3 install psycopg2
# Making a virtual environment for the django api, creating the api project
cd C:\Users\jeremiah\Dev\DocApp\api
mkvirtualenv doc-app-api
workon doc-app-api
pip install django
pip install djangorestframework
django-admin startproject docapp
cd docapp
django-admin startapp docapp1
python manage.py migrate
python manage.py createsuperuser
admin
pickles48
pickles48
# Test api (in bash)
curl -H 'Accept: application/json; indent=4' -u admin:pickles48 http://127.0.0.1:8000/users/
# Can also navigate to http://127.0.0.1:8000/users/ and log in at top right
# Start postgres:
# run: services.msc
python manage.py runserver 127.0.0.1:3000
From: https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions
Not really. You can count yourself: a letter page size is 816⨉1056px at 96DPI (and if you have a HiDPI display, multiply each dimension by window.devicePixelRatio, e.g., 2), so you will need a canvas that takes up 816⨉1056⨉4 = 3,446,784 bytes (don't forget to multiply that by e.g., 2⨉2 = 4 if it's a HiDPI display). This requires you to allocate 3.5Mb (or 14Mb) per page. You need a decent amount of memory to hold the 100 canvases, and it does not count the time that is spent on rendering them.
The demo viewer creates, renders, and holds canvases only for visible pages to reduce the amount of used memory. Our recommendation is to create and render only visible pages.
# Sync dist folder to S3 and grant public read access
cd C:\Users\jeremiah\Dev\DocApp\web-client && npm run build
aws s3 sync C:\Users\jeremiah\Dev\DocApp\web-client\dist s3://docapp.jeremiahstrang.com --acl public-read
# List files in S3 bucket
aws s3 ls s3://mortgagebreakdown.com