amitanshusahu / node-containerized-execution-env

LeetCode backend, scaleble nodjs backend which runs user submitted code in a containerized code execution envroment, implementaion of RabbitMq RPC, devops assignment of @hkirat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

code-execution-backend-project-1.mp4

Set Up the Project

  • clone the repo
git clone https://github.com/amitanshusahu/node-containerized-execution-env.git
  • open the server folder inside the repo folder
cd  node-containerized-execution-env/server
  • install all dependencies
npm i
  • pull node and gcc docker image
# pull latest node image
docker pull node
# pull latest gcc image
docker pull gcc
  • run RabbitMq and bind it to port 5672 in a terminal instance
docker run \
-p 5672:5672 \
rabbitmq
  • open another terminal instance and run the node server, from server folder
# go to server folder
cd server
# start the server
npm start
  • open another terminal instance and serve the index.html, from client folder
# go from server folder to  client folder
cd ../client
# create a static server 
npx serve

make sure 3000, 3010, 5672 are not bussyyyy!!

load test

  • install loadtest
npm i -g loadtest
  • test the server
# send 1000 reqs with an concorency level 100
loadtest -n 1000 -c 100 http://localhost:3010

References

Star the Repo ⭐

About

LeetCode backend, scaleble nodjs backend which runs user submitted code in a containerized code execution envroment, implementaion of RabbitMq RPC, devops assignment of @hkirat


Languages

Language:JavaScript 58.5%Language:HTML 27.3%Language:CSS 14.2%