Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercise 4 #10

Merged
merged 18 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ jobs:
npm run test
npm run lint
env:
CI: true
CI: true,
JWTSECRET: ${{ secrets.JWTSECRET }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the only necessary line of code.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
backend/node_modules
backend/node_modules
backend/.env
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ This is the homework repository for the group Felni from Felix and Nicolas.

### Exercise 3:

- Link to folder: [Apollo GraphQL Backend](./backend)

### Exercise 4:

- Link to folder: [Apollo GraphQL Backend](./backend)
1 change: 1 addition & 0 deletions backend/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
JWTSECRET=yourjwtsecret
4 changes: 4 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Apollo Backend

## Mandatory for running tests ´
Create a .env file in the root backend folder and add a secret JWTSECRET for signing the JWT token (e.g. JWTSECRET=yoursecret)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also check in a .env.template with dummy secrets and then tell the user to

$ cp .env.template .env

this file.

For easy use, you can use the already existing .env.template, renaming the file to .env (e.g. cp .env.template .env) and modifying the secret.

## Project setup
```
npm install
Expand Down