Skip to content

vkaidalov/optimus-type.api-server

Repository files navigation

optimus-type.api-server

Build Status codecov Heroku

Setup development environment

  1. Create .env file and set the following variables in it:
    • DATABASE_NAME
    • DATABASE_USER
    • DATABASE_PASSWORD
    • DATABASE_HOST
    • DATABASE_PORT
  2. sudo -u postgres psql
  3. Run the following queries against your PostgreSQL database:
    CREATE DATABASE <DATABASE_NAME>;
    CREATE USER <DATABASE_USER> WITH PASSWORD '<DATABASE_PASSWORD>';
    
    ALTER ROLE <DATABASE_USER> SET client_encoding TO 'utf8';
    ALTER ROLE <DATABASE_USER> SET default_transaction_isolation TO 'read committed';
    ALTER ROLE <DATABASE_USER> SET timezone TO 'UTC';
    
    GRANT ALL PRIVILIGES ON DATABASE <DATABASE_NAME> TO <DATABASE_USER>;
    ALTER USER <DATABASE_USER> CREATEDB;
    \q
  4. pipenv install --dev
  5. pipenv run python manage.py migrate
  6. pipenv run python manage.py runserver

Setup production environment

TODO: CORS_ORIGIN_WHITELIST

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages