Skip to content

Latest commit

 

History

History
76 lines (55 loc) · 1.77 KB

README.md

File metadata and controls

76 lines (55 loc) · 1.77 KB

Konfig

The monorepo that holds everything...

Getting started

Get the repository on your local machine. Takes a minute.

git clone https://github.com/konfig-dev/konfig --recursive
cd konfig

This repository has submodules so pull all of them. Also take a few minutes.

git submodule update --init --recursive --remote --merge

Environment Setup

  1. Run Postgres as a background process

    # in /konfig
    brew install postgresql
    mkdir -p postgres/data
    initdb -D ./postgres/data
    pg_ctl -D ./postgres/data start
  2. Setup .env file in generator/konfig-dash to something like:

    DATABASE_URL="postgresql://dylanhuang@localhost:5432/konfig_dev?connection_limit=1"
    TEST_DATABASE_URL="postgresql://dylanhuang@localhost:5432/konfig_test?connection_limit=1"
    
    AWS_ACCESS_KEY_ID=XXXXXX
    AWS_SECRET_ACCESS_KEY=XXXXXX
    
    # Used to encrypt/decrypt session cookies. Change this value and re-deploy to log out all users of your app at once.
    SESSION_SECRET=ZUWpQ9pB4fB5FFpjHLi8Z2qadzXkdTKhHBsXmGmjNdxtrZbevaCYWSpw7G7cHBhh
    

Paste this into your ~/.zshrc or ~/.bashrc

if [ -f $HOME/.envvars ]; then
    . $HOME/.envvars
else
    print "404: ~/.envvars not found."
fi

Then create ~/.envvars with values from Dylan.

How to run Konfig

  1. Make sure node_modules is initiated in konfig-dash

    cd generator/konfig-dash
    yarn # takes some time
    yarn rw prisma migrate dev # setup the DB
  2. Start the server with yarn dev

    # inside generator/konfig-dash
    yarn dev
  3. Start generator/konfig-generator-api w/ IntelliJ

  4. cd into an SDK repo and run konfig generate -d

Making Changes

See Changesets