Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A super light-weight code compiler using Express.js

NotificationsYou must be signed in to change notification settings

murshidazher/code-compiler

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

Technology Stack

  • ExpressJS - lightweight web framework for Nodejs.

Native Compiler Dependencies

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 theenv path
  • 📦.NET Compiler - Enable command-line compilation for CSharp .NET and the set theenv variable to accesscsc compiler

Instructions

Step by Step Instructions:

TaskDescription
dependenciesRunnpm i to download the required node modules
startRunnpm start to start react in dev mode using nodemon
testRunnpm run test to run unit tests.

📂 What's inside?

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

Support Programing Languages

💡 You can use this tool to escape code characters when testingcode-santizer

  • Python
  • Java
  • CSharp
  • JavaScript

Body Request Configuration

Argument 1

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.

Argument 2

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"}

Supporting Test Case Languages

  • Python
  • Java
  • CSharp
  • JavaScript

Contributors

Murshid Azher


[8]ページ先頭

©2009-2025 Movatter.jp