- Notifications
You must be signed in to change notification settings - Fork1
murshidazher/code-compiler
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A super light-weight code compiler using Express.js
A light-weight code compiler with test case checking and much more... implemented using Express.js
- ⚡ExpressJS - lightweight web framework for Nodejs.
You need to have the following compilers installed
- 📦JavaSE JDK 11+ - Java SDK 11+ for single-line compilation
- 📦Python 3 - download the Python 3.+ version and set the
envpath - 📦.NET Compiler - Enable command-line compilation for CSharp .NET and the set the
envvariable to accesscsccompiler
Step by Step Instructions:
| Task | Description |
|---|---|
| dependencies | Runnpm i to download the required node modules |
| start | Runnpm start to start react in dev mode using nodemon |
| test | Runnpm run test to run unit tests. |
A quick look at the folder structure of this project.
.└── root ├─controllers ├───csFile.js ├───javaFile.js └───pythonFile.js ├─middleware └───writeToFile.js ├─questions ├─question_name ├───csharp ├───Solution.cs ├───SolutionTester.cs ├───RealSolution.cs └───Template.cs ├───java ├───javascript ├───python └───testcase.txt ├─package.json ├─package-lock.json ├─server.js └─README.md💡 You can use this tool to escape code characters when testingcode-santizer
- Python
- Java
- CSharp
- JavaScript
Name:code
Type:String
Default:
⚠️ This field is required
This contains the solution for the given problem.
⚠️ Sanitize the code before sending it through the body.
Name:input
Type:String
Default:null
This contains the user inputs for the given problem. It could benull if there isn't any user inputs.
Example:
// endpoint - http://localhost:4001/python{"code":"class Solution(object):\r\ndef twoSum(self, nums, target):\r\nif nums is None :\r\nreturn [1,0]\r\nif len(nums) <= 1:\r\nreturn [0,0]\r\nbuff_dict = {}\r\nfor i in range(len(nums)):\r\nif nums[i] in buff_dict:\r\nreturn [buff_dict[nums[i]], i]\r\nelse:\r\nbuff_dict[target - nums[i]] = i","input":"10"}
- Python
- Java
- CSharp
- JavaScript
Murshid Azher
- Github:@murshidazher
About
A super light-weight code compiler using Express.js
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.