Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Introduction

This project executes arbitrary JavaScript code within the context of a Docker container.

It receives the code and a single parameter in an HTTP POST request, creates a docker container, executes the code in the container, and then returns the result over the same POST request.

I consider this at the proof-of-concept stage. I figured out how to do all the basic requirements, but I don't consider the project up to professional standards. For specifics, see the Remaining Work section below. For an idea of a more polished project, please see:

ReactJS Example App

Usage

$ npm start
$ curl -F "app=@examples/script2.js" -F param=4 http://veterok.local:3000/process

Note: It looks like the provided script2.js is a duplicate of script1.js.

Remaining Work

  • Automated Testing, Continuous Integration, etc
  • More flexible parameter handling
  • Authentication on HTTP requests
  • File System Security - Right now all spaces are readable by all users
  • General Cleanup - Code organization and conventions, promises vs callbacks, etc

Articles I read while implementing this

Dependencies

About

Demo Docker Microservices Provisioning App written in NodeJS

Resources

Releases

No releases published
You can’t perform that action at this time.