Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thebinarypenguin/ceb3cb3b4e49f45ca197370ef05a1426 to your computer and use it in GitHub Desktop.
Save thebinarypenguin/ceb3cb3b4e49f45ca197370ef05a1426 to your computer and use it in GitHub Desktop.
Capstone 2 day 0 Questions
Which database tables are created in the migrations?
user, language, word
What are the endpoints for user registration, login and refresh?
/api/auth/token, /api/user
What endpoints have been implemented in the language router?
/api/language
What is the async and await syntax for?
async/await is a relatively new javascript feature for handling Promises with a cleaner syntax
Which endpoints need implementing in the language router?
/api/language/head, /api/language/guess
How does the GET /api/language endpoint decide which language to respond with?
It uses the LanguageService which in turn queries the language table
In the UserService.populateUserWords method, what is db.transaction?
A knex method for creating a SQL transaction
What is SERIAL in the create migration files?
A postgres specific data type often used for primary keys
What is setval in the seed file?
A postgres function to set the current value of a sequence
---
Which routes are already set up and what are their paths?
/ DashboardRoute
/learn LearningRoute
/register RegistrationRoute
/login LoginRoute
(catch-all) NotFoundRoute
What is the concern of the AuthApiService object?
User sign-up, sign-in, and token refreshing
What is the concern of the UserContext?
To provide access to the user sign-in, sign-out functions
Does the PrivateRoute make use of the UserContext?
Yes
What does the /cypress/integration/day-0.1-purpose.spec.js file test?
The presence of certain HTML tags and content
Which elements on the page are being checked in and what for?
header h1, should contain Spaced Repetition
p, should contain Practice learning a language with the spaced reptition revision technique.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment