https://github.com/ebukaodini/quiz-builder-app
An app that allow authenticated users to create their own quizzes and anonymous visitors to take them and see how many questions they got right.
https://github.com/ebukaodini/quiz-builder-app
bootstrap expressjs javascript mongodb mongoose nodejs react scss styled-components typescript
Last synced: 3 months ago
JSON representation
An app that allow authenticated users to create their own quizzes and anonymous visitors to take them and see how many questions they got right.
- Host: GitHub
- URL: https://github.com/ebukaodini/quiz-builder-app
- Owner: ebukaodini
- Created: 2022-08-11T09:31:19.000Z (almost 4 years ago)
- Default Branch: dev
- Last Pushed: 2022-08-11T09:35:11.000Z (almost 4 years ago)
- Last Synced: 2025-06-19T23:46:46.265Z (about 1 year ago)
- Topics: bootstrap, expressjs, javascript, mongodb, mongoose, nodejs, react, scss, styled-components, typescript
- Language: TypeScript
- Homepage:
- Size: 3.26 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QUIZ BUILDER APP
A simple quiz builder
## Server
#### Setup
To setup the server, enter the client directory.
```bash
$ cd server
```
Create a `.env` file and copy the code below into the file.
```.env
PORT=5000
TOKEN_SECRET=
MONGODB_CONNECTION_URL=
MONGODB_CONNECTION_URL_TEST=
```
Create a MongoDB Cluster and add replace `` & `` with the actual connection url. Make sure the database name is included in the url.
To generate the TOKEN_SECRET, run the following commands below
```bash
$ node -i
```
then
```bash
> require('crypto').randomBytes(32).toString('hex')
```
Replace with the hexa-decimal output from the command above.
#### Test
```bash
$ npm test
$ npm run test:file
```
#### Run
```bash
$ npm start
$ npm run start:dev
```
#### API Documentation
[https://documenter.getpostman.com/view/6884204/UzR1LNRU](https://documenter.getpostman.com/view/6884204/UzR1LNRU)
## Client
### Setup
To setup the client, enter the client directory.
```bash
$ cd client
```
Create a `.env` file and copy the code below into the file.
```.env
REACT_APP_APPID=
REACT_APP_DOMAIN=http://localhost:3000
REACT_APP_API_DOMAIN=http://localhost:5000
```
To generate the REACT_APP_APPID, run the following commands below
```bash
$ node -i
```
then
```bash
> require('crypto').randomBytes(32).toString('hex')
```
### Run
```bash
$ npm start
```
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
### Build
```bash
$ npm run build
```