An open API service indexing awesome lists of open source software.

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.

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
```