HackerEarth-node
Node JS library for using HackerEarth API
This library helps you to compile your code with HackerEarth API v3
Using HackerEarth API you can compile and run your code using their codeTable
PreRequisite
- Make sure you are using latest version of nodeJS.
- You have to obtain your client secret key from HackerEarth Here and voila you are done!
Install
npm install hackerearth-node
Set Up
var hackerEarth=; //require the Library//Now set your applicationvar hackerEarth='**********' //Your Client Secret Key here this is mandatory'' //mode sync=1 or async(optional)=0 or null async is by default and preferred for nodeJS;var config={};configtime_limit=1; //your time limit in integerconfigmemory_limit=323244; //your memory limit in integerconfigsource=''; //your source code for which you want to use hackerEarth apiconfiginput=""; //input against which you have to test your source codeconfiglanguage="C/C++/Py/C#"; //optional choose any one of them or none
Compile Your code
-
Using Callbacks
//compile your codehackerEarth; -
Using Promises
//compile your codehackerEarth;
Run Your Code
-
Using Callbacks
//compile your codehackerEarth; -
Using Promises
//compile your codehackerEarth;
Wanna Debug ?
Append
debug=HE
before your node server command or whatever is calling HackerEath-node module.
Todos
- Use ES6 in source and transpile to babel for older version and put it into distribution/
- Promisify whole package
- Using travis build tools for testing