Quiz Whiz is a competitive multiplayer trivia game written in Typescript where players play up to 7 other players in various trivia categories.
Node
React
Express
PostgreSQL
Typescript
WebSocket
Axios
Create an Elephant SQL database with the following command
CREATE TABLE "users" (
"username" varchar(255) NOT NULL,
"password" varchar(255) NOT NULL,
"rating" integer NOT NULL DEFAULT '1000',
CONSTRAINT "users_pk" PRIMARY KEY ("username")
) WITH (
OIDS=FALSE
);
In the root directory, create a .env file with the property of DB_URL and the corresponding Elephant SQL URL:
DB_URL=postgres://example:example.db.elephantsql.com:PORT/example
Additionally in /client/context/GlobalContext, set the state of IP to be the IP address of the hosting server:
const [rating, setRating] = useState<number>(1);
const [username, setUsername] = useState<string>('');
const [accessCode, setAccessCode] = useState<string>('');
// INSERT IP ADDRESS HERE ↓
const [IP, setIP] = useState<string>('');