Skip to content

jbcpollak/docker-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published