Yet Another Harry Potter Quiz (Frontend)
This repository contains the React.js
frontend code for the yahpq.rocks website.
- Clone the repository for the backend Django REST API and follow the setup instructions
- Install
node.js
from nodejs.org (if needed). This website uses v12.13.1. - Clone the current repository using
git clone https://github.com/AbhishekPednekar84/hpquiz-frontend
- Install dependencies from
package.json
using the commandnpm install
- Verify the backend api endpoint in
/src/config.js
- Run the application locally using
npm start
At this point, assuming that the backend is running in a separate terminal window, the website should be accessible at http://localhost:3000.
- Create the build using
npm run build
- Run the build using the command
node server.js
Assuming that the backend is up and running, the website should be accessible at http://localhost:3000.
- Verify the backend api endpoint in
/src/config.js
- In
server.js
, ensure that the path to thestatic
folder isapp.use(express.static(path.join(__dirname, "./")));