Skip to content

pmonster/nakamotoinstitute.org

 
 

Repository files navigation

Satoshi Nakamoto Institute

NakamotoInstitute.org was written in Flask.

Guide to Installing SNI Locally

  1. Install PostgreSQL

  2. Create a user and a new database (Instructions)

  3. 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
  1. Update your /etc/hosts file:

    127.0.0.1 localhost
    127.0.0.1 sni
    127.0.0.1 satoshi.sni

  2. Update config.py if you would like to change "sni" in step 4 to a different [domain]

  3. Find-replace the http://nakamotoinstitute.org in satoshiposts.json to http://sni:5000 (or the SERVER_NAME of your choice).

  4. Download the PDFs and txts here and place them in /static/templates/docs

  5. Set up a virtualenv with virtualenv --no-site-packages venv and . venv/bin/activate

  6. Install the dependencies using pip install -r requirements.txt.

  7. In a Python console run from sni import db and db.create_all()

  8. Run python dataimport.py. The db will be cleared and re-populated each time you do this.

  9. Run python run.py runserver and navigate to sni:5000 in your browser.

  10. Migrations are done with Flask-Migrate. You can start enable migrations by running:
    python run.py db init

How You Can Help

  • 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.

About

A website for preserving and continuing the crypto-anarchist tradition

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.0%
  • CSS 6.0%