Skip to content
Magnus L. Holtet edited this page Apr 29, 2022 · 2 revisions

Knowit Folk Server

Configuration

Create an .env file in the apps/server directory with the contents:

OAUTH_URL=
CLIENT_ID=
CLIENT_SECRET=

Note that the OATH_URL is called DATAPLATTFORM_AUTH_URL in the Parameter Store

Fill in the necessary values (See AWS parameters. Make sure you're logged into the developement environment and that you are using the correct region, eu-central-1).

AWS credentials

You'll need your AWS key ID and secret (See AWS credentials). To retrieve your credentials, follow the steps here

You can add your AWS credentials in the same .env file:

AWS_REGION="eu-central-1"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=

or use the aws-cli to generate a ~/.aws/credentials file:

Install the latest aws-cli version and run the configuration.

aws configure

Note: Loading the ~/.aws config requires the .env variable AWS_SDK_LOAD_CONFIG="true".

Dependencies

Package
cross-env
dotenv
nodemon

Available Scripts

Before finishing, run

yarn install

In the project directory, you can run:

yarn dev:local

Runs in development mode.

Push your changes on dev to prod

After you've done all the coding and finally merged your pull request to dev, you might want to push it to prod as well. First, update changelog.md and check if every report created also has been created in prod env. Next, go to the folk-webapp here on github, on the <> Code page there is a link to Realeases on the right side of the screen. Click on it, and click Draft a new release.

Here you write what has been changed and call the release x.x.x, ex: 4.0.0 or 4.0.2.