-
Notifications
You must be signed in to change notification settings - Fork 0
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
Exercise 4 #10
Changes from 14 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5620160
add graph packages and update readme
NicolasTsc 174eeff
add signup
NicolasTsc 7159620
add login method and shields WIP
felixriehm ec16a02
lint
NicolasTsc 8efd893
add nodeman, refactor code and implement security check
NicolasTsc a38aa07
added and fixed tests
NicolasTsc 13e7017
Update package-lock.json
NicolasTsc 5d4eb9b
add console log
NicolasTsc 7a40821
try to fix tests
NicolasTsc ac90d65
Update package.json
NicolasTsc 66a341b
add dotenv
NicolasTsc 141b7da
add .env file to github workflow
NicolasTsc 1e4434f
add secret
NicolasTsc e7a9ebb
Update README.md
NicolasTsc e0737f0
refactor and improve code
NicolasTsc ab06ebd
Update index.spec.ts
NicolasTsc 098e1bf
minimize code, add user and post class,
NicolasTsc 2121f2e
Merge branch 'main' into exercise-4
NicolasTsc File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,8 +33,11 @@ jobs: | |
- name: Install, test and lint backend | ||
working-directory: ./backend | ||
run: | | ||
touch .env | ||
echo JWTSECRET=$JWTSECRET >> .env | ||
npm install | ||
npm run test | ||
npm run lint | ||
env: | ||
CI: true | ||
CI: true, | ||
JWTSECRET: ${{ secrets.JWTSECRET }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's the only necessary line of code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
backend/node_modules | ||
backend/node_modules | ||
backend/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# 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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could also check in a
this file. |
||
|
||
## Project setup | ||
``` | ||
npm install | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use
dotenv
ordotenv-flow
you can overwrite those values specified in.env
with your currentprocess.env
.Have you tried deleting
.env
and then run your sever with:This should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review Robert. As I can
t comment your review message I have to write it here. We actually did request a mentors-review in the first week of the exercise, so maybe the notification didn
t work as expected.