New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

compileon

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compileon

Makes building online compilers easy

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

compileon

GitHub license GitHub issues npm version

Makes building online compilers easy.

compileon is a library written in node that helps you build online compilers and editors with ease.

Install

The package can be installed with node.js npm package manager. If you don't have node.js installed you can download it here

$ npm install -g compileon

Note: The -g flag might require sudo permisson.

Usage

First install the compilers required.

  • For Java, install the JAVA SDK .
Without Input:
    //if windows  
    var envData = { OS : "windows"}; 
    //else
    var envData = { OS : "linux" };
    compiler.javaCompile( envData , code , function(data){
        res.send(data);
    });    

Note: As compiling is same for Java in either of the OS can select either of the OS while using it.

With Input:
    //if windows  
    var envData = { OS : "windows"}; 
    //else
    var envData = { OS : "linux" };
    compiler.compileWithInput( envData , code , input ,  function(data){
        res.send(data);
    });
Without Input:
    //if windows  
    var envData = { OS : "windows"}; 
    //else
    var envData = { OS : "linux" };
    compiler.executePython( envData , code , function(data){
        res.send(data);
    });    

Note: As compiling is same for Python in either of the OS can select either of the OS while using it.

With Input:
    //if windows  
    var envData = { OS : "windows"}; 
    //else
    var envData = { OS : "linux" };
    compiler.executeWithInput( envData , code , input ,  function(data){
        res.send(data);
    });
Without Input:
    //if windows 
    var envData = { OS : "windows", cmd: "gcc" or "g++"}; 
    //else
    var envData = { OS : "linux", cmd: "gcc" or "g++"};
    compiler.cppCompile( envData , code , function(data){
        res.send(data);
    });    

Note: Can choose either gcc or g++.

With Input:
    //if windows  
    var envData = { OS : "windows", cmd: "gcc" or "g++"}; 
    //else
    var envData = { OS : "linux", cmd: "gcc" or "g++"};
    compiler.cppcompileWithInput( envData , code , input ,  function(data){
        res.send(data);
    });

Further Updates

  • Have to add compilers for other languages - Golang.
  • Have to add Example.

Contributing

  • Fork it and then do the changes or else download the zip file, test to make sure nothing is going sideways.
  • Make a pull request with a detailed explanation.

License

MIT

Keywords

compiler

FAQs

Package last updated on 17 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts