Hacker-Earth | This is my HackerEarth Handle | Learning library
kandi X-RAY | Hacker-Earth Summary
kandi X-RAY | Hacker-Earth Summary
This is my HackerEarth Handle
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Hacker-Earth
Hacker-Earth Key Features
Hacker-Earth Examples and Code Snippets
Community Discussions
Trending Discussions on Hacker-Earth
QUESTION
I am creating an application where the student enters the code in the front- end(Angular).The code will be sent to back-end(NODE) for compilation and run. I know about HACKER-EARTH API which can be used to get the compilation and output results through API calls. I want to make this application available offline (INTRANET not INTERNET).Is there any possible way so that my application can communicate with the compilers (JAVA,PYTHON,C) installed on the system to compile the given code and return the results?
Any resources/Links would be very helpful.
Please help! Thanks in advance!
...ANSWER
Answered 2017-Oct-26 at 05:15First write a file of the code you get from the front end then(if the file is written successfully) you can use spawn or exec from child processes to call the compilers and executing the code and get the stdout and stderr. You can refer to https://nodejs.org/api/child_process.html for child processes
You can also use these packages or refer to their code
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Hacker-Earth
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page