Run Quiz Galaxy - NextJS on your local machine
Prerequisites
- Node.js (opens in a new tab) installed on your machine
- Yarn (opens in a new tab) installed on your machine (or npm)
- You need to have access to a PostgreSQL database (you can use ElephantSQL (opens in a new tab), or Render (opens in a new tab), which has a free tier)
Steps
- Create a .env file in the root of the project, copy the content from the .env.example file and fill in the values
- The
AUTH_SECRET
can be any string, it is used to encrypt the user's password
- After you have the .env file, you can run the following commands inside a terminal in the root of the project:
yarn install
OR
npm install
- After the installation is done, you need to add the initial data to the database. You can do this by running the following command:
yarn typeorm:migrate
OR
npm run typeorm:migrate
- This command will create the tables in the database and add the quiz questions inside a table
- After the migration is done, you can run the project by running the following command:
yarn dev
OR
npm run dev