Flashcards is Quizlet inspired replica.
Checkout the website here.
Table of Contents
Use Flashcards to:
- Create, read, and update operations flashcard sets
- Duplicate other users flashcard sets in order to create, read, and update your very own copy of the original flashcard set
- Search all public flashcard sets
- Study flashcard sets to prepare for a quiz, test, or exam
To setup project locally follow these steps:
- Node 14.3
- npm 6.14.6
- PostgreSQL 12.3
- Once installed, if you're node version does not work with the project, change node version by running this command:
nvm install 14.13.0
- Follow instructions on Postgres.app for simple PostreSQL install
- Create a
development
database
-
In terminal, enter:
psql
-
When you enter the psql terminal enter:
-
Create User Create User w/ Password:
CREATE USER [username] WITH PASSWORD [password] CREATEDB;
or
Create User w/o Password:
CREATE USER [username] CREATEDB;
You do not need a password, either way will work. Make sure to include semi-colon or query will not execute
-
Create Database
CREATE DATABASE [database_name];
-
-
You can check to see if the database was created by entering
\l
-
You should see your database within the table of databases
-
Exit
psql
usingexit
command
-
Create an
.env
file in the top level of the projectserver
directory and add relevant information. Replace them with the variables you used above.(These env variables are used in theknexfile.js
file if you want to directly change them.)DEVELOPMENT_DATABASE_HOST=127.0.0.1 DEVELOPMENT_DATABASE_USER=[username] DEVELOPMENT_DATABASE_PASSWORD=[password] // (If no password, leave blank) DEVELOPMENT_DATABASE_NAME=[database_name] JWT_SECRET: String (any alphanumeric string)
-
Run database migrations and seed database
cd
into the projectserver
directory- Run Database Migrations
knex migrate:latest
- Run Database Seeds
knex seed:run
-
Start server
npm run dev
-
cd
intoclient
directory and runnpm install
-
Run
npm start
to start client
Project will run on and proxy requests to Node API through localhost:3000