Skip to content

BeatCodeOrg/beat-code-frontend

Repository files navigation

Video of working project

beatcode.mov

Set up of repo

  • First run git clone (this branch)
  • Then cd into the folder
  • Then run npm i

Judge0 set up

In order to run code, you have to create environment variables

  • run touch .env and open that file in a text editor
    • touch just creates a file
  • you need to create 3 environment variables
    • to learn about .env files, read this: https://blog.devgenius.io/why-a-env-7b4a79ba689 and https://medium.com/how-to-react/using-env-file-in-react-js-b2714235e77e

    • we are using React.js but I prefer to use Vite to build the React Project cause it's faster, so in the code there's like a very small difference but the concept of the file is the same

    • VITE_JUDGE0_SUBMISSIONS_URL=https://judge0-ce.p.rapidapi.com/submissions

      • you can copy that line and insert it on it's own line in the file
    • VITE_RAPID_API_HOST=<rapid api url>

      • I'm pretty sure it's the same value for everyone (judge0-ce.p.rapidapi.com) but just in case
    • VITE_RAPID_API_KEY=<judge0 rapid api key>

      Screen Shot 2023-10-23 at 3 40 15 PM
      • then replace the stuff after the equal sign to the values
      • also, no, you do not include the angle brackets in the line
  • save the .env file
  • run npm run dev

About

Beatcode is a live competitive of Leet Code questions that you can play against your friends.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors