/TUF_task_frontend

Backend Link: https://github.com/7twik/TUF_task_backend

Primary LanguageJavaScript

7's IDE

What I have done?


I made the IDE page where users can enter their username, choose language and write code and run it..

While running the code I sent the data to judge0 api which returns a token, then I again sent the token to extract the output which might even result in pending or it might even be compilation error or be a simple output.

If it comes as pending then I have to request again in a recursive way after 5 second timer

While all this is happening I made a loader as the response time was a bit too high

Then I showed the output in another field and presented the submit button as well on clicking which it will get stored in the mysql db
In backend i am fetching mysql data on a cron job and setting it to a variable in redis server which acts as a wall before my mysql db as it reduces the no. of reads thereby reducing cost
the redis server updates itself after every 1 minute, which can be changed according to what i set the cron job code to be. I set it to 1 minute so that the reviewer of the task can review it immediately and doesn't have to wait

Next coming back to the frontend I fetched the data from the api and showed it in another route named /history

Also the pages are responsive< br/>

How to run the project in local environment?

step 1: git clone https://github.com/7twik/TUF_task_backend.git
step 2: cd into the folder
step 3: npm install
step 4: npm run dev