How to build an Online Code Compiler using MERN Stack? | Part 1

Share it with your friends Like

Thanks! Share it with your friends!

Close

In this video, I’ll demonstrate how to build an online code compiler using React.js and Node.js. You’ll learn techniques about designing an API, run system commands using Node.js, making a frontend using React, and communicating using Axios library.

GitHub Code: https://github.com/zerefwayne/online-compiler

Timestamps:

0:00 – Demo & Overview
0:20 – Planning
1:06 – Set up Node.js Backend
5:25 – Implement POST /run route
12:52 – Write file using ‘fs’
25:03 – Run shell command ‘exec’
37:48 – Set up React.js
39:39 – Implement frontend
43:20 – Use ‘axios’ & CORS
48:03 – Wrap Up!

Recommended links to go through:

1) https://nodejs.org/api/child_process.html
2) https://github.com/axios/axios
3) https://reactjs.org/docs/hooks-state.html

—-

GitHub: https://www.github.com/zerefwayne
LinkedIn: https://www.linkedin.com/in/aayushjoglekar/

#tutorial #reactjs #nodejs #tutorial #coding #javascript #fullstack

Comments

Ankan Das says:

I was searching for child process and i landed on it & I always wanted to build something like this. Thank you so much for value. ❤️ ❤️

GRAHEETH G says:

Bro For me error is : Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. In ExecuteCpp file . Please help me to clear the error

Sumit Kumar Soni says:

do i have to install g++ compiler in my local pc??

Sumit Kumar Soni says:

UnhandledPromiseRejectionWarning: this error in executeCpp file….please check

Shubham Auddy says:

Thanx a lot Buddy. Please make more videos really loved it.

Masahiro AOKI says:

Your explanation is awesome. Easy to understand.

Google User says:

Which Screen record use used for recording this video ?

Abdul says:

Thop 🔥🔥🔥😵😵😵😵❤❤❤

Arup De says:

plz man .. upload regularly ..

KUMUDARANI MAHANTA says:

Postman is giving 404 error

Sadma_Aashiq says:

Why you not take input part in app?
If the program was input part then?

Vasundhara Tiwari says:

After running g++ file.exe, a.exe file is generated, not a.out ?? What to do?

Priyanka Manna says:

in executeCpp.js i am getting this error please help

(node:47244) UnhandledPromiseRejectionWarning: #<Object>

(Use `node –trace-warnings …` to show where the warning was created)

(node:47244) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rej/nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:47244) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Charu Tandon says:

Please drop part 2

Aman Gupta says:

hey bro how we can give test cases

aravinth Ganesh says:

Bro can we use the spring boot here

Garima Singh says:

Oof 🔥🔥🔥

Nimit Wadhwa says:

hey i am getting an error "'.' is not recognized as an internal or external command,rnoperable program or batch file.rn"

ANSH GAIKWAD says:

When is part 2 coming? 🤔

Naman Deept says:

Awesome bro 🔥🔥

Reply to Ankan Das Cancel reply

*