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

Database setup #25

Merged
merged 34 commits into from
Mar 23, 2023
Merged

Database setup #25

merged 34 commits into from
Mar 23, 2023

Conversation

Kwasow
Copy link
Member

@Kwasow Kwasow commented Mar 22, 2023

Some setup is required.

  1. Add a file src/secrets.ts with the contents:
export const user = '<your username>'
export const password = '<your password>'
  1. Before running yarn start setup tunneling with:
ssh -L 5432:lkdb:5432 ab123456@students.mimuw.edu.pl
  1. Run yarn start

If everything worked correctly, you should see two tables created under your account: Games and Players.

Closes #4

@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: +24.90 🎉

Comparison is base (069ac9e) 26.31% compared to head (c0e4ee3) 51.21%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #25       +/-   ##
===========================================
+ Coverage   26.31%   51.21%   +24.90%     
===========================================
  Files           3        3               
  Lines          19       41       +22     
  Branches        0        2        +2     
===========================================
+ Hits            5       21       +16     
- Misses         14       20        +6     
Impacted Files Coverage Δ
src/index.ts 0.00% <0.00%> (ø)
src/databaseConnection.ts 69.56% <69.56%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

.gitignore Show resolved Hide resolved
Copy link
Member

@sormys sormys left a comment

Choose a reason for hiding this comment

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

Please remove doubled yarn-error.log from .gitignore.

@Kwasow Kwasow merged commit 4d6dbbd into main Mar 23, 2023
@Kwasow Kwasow deleted the @kwasow/databaseSetup branch March 23, 2023 17:14
@mikolaj-pirog mikolaj-pirog mentioned this pull request Mar 26, 2023
Kwasow pushed a commit that referenced this pull request Mar 31, 2023
Adds get response to server to createGame. Adds `celebrate` as
dependency to validate data.

This needs database setup per #25. 

Error messages are generated automatically through celebrate. We needed
to employ special function to change error response. Unfortunately
celebrate does not easily allow to change http code per error.

Generation of new random keys is done in database, as this is easier and
more elegant.

Database's definitions have been changed, see `databaseConnection.ts`

Firebase token validation is yet to be done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup database connection
3 participants