NakamotoInstitute.org was written in Flask.
-
Install PostgreSQL
-
Create a user and a new database (Debian instructions).
-
Create file in the project's root folder called
config.py
:
import os
basedir = os.path.abspath(os.path.dirname(__file__))
SERVER_NAME = 'sni:5000'
SQLALCHEMY_DATABASE_URI = "postgresql://[username]:[password]@sni/[database]"
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
DEBUG = False
CSRF_ENABLED = True
-
Update your /etc/hosts file:
127.0.0.1 localhost
127.0.0.1 sni
127.0.0.1 satoshi.sni -
Update config.py if you would like to change "sni" in step 4 to a different [domain]:
-
Change the links in satoshiposts.json to http://sni:5000 (or the SERVER_NAME of your choice).
-
Download the PDFs and txts here and place them in /static/templates/docs
-
Set up a virtualenv
-
Install the dependencies using
pip install -r requirements.txt
. -
In a Python console run
from sni import db
anddb.create_all()
-
Run
python dataimport.py
. The db will be cleared and re-populated each time you do this. -
Run
python run.py runserver
and navigate to sni:5000 in your browser. -
Migrations are done with Flask-Migrate.
- Format the HTML literature templates
- Adjust the CSS and HTML to improve readability and navigation
- Write tests for the Python code
--
NakamotoInstitute.org is under the GNU Affero License.