Coder Social home page Coder Social logo

chimera's Introduction

Chimera

CGI with Ruby and JSON.

Architecture

The main idea is to expose any kind of code inside the registry folder to the web. The request object (parameters, etc.) is serialized to JSON and passed as environment variable to non-ruby binaries/scripts.

There is no kind of sandboxing implemented (and probably never will be).

Never run this as root user in production!

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Please see the requirements.txt for dependencies.

Installing

Clone the repository:

git clone https://github.com/doomguy/chimera

Run Chimera:

ruby chimera.rb

Interact with it:

curl localhost:4567/helloRuby
Hello, World!
This is Ruby!

curl localhost:4567/helloRuby?name=FooBar
Hello, FooBar!
This is Ruby!

curl localhost:4567/helloPython
Hello, World!
This is Python!

curl localhost:4567/helloPython?name=FooBar
Hello, FooBar!
This is Python!

Please note: Examples for other languages may need some more work to run. See the README.md in the respective example folder.

Usage

For new scripts follow these simple steps:

  1. Create a new folder under registry (CamelCase recommended).
  2. For native ruby code, just have a look at the helloRuby example.
  3. For non-ruby code, copy the helper.rb into the folder and rename it to the folder name. By default GET and POST is supported.
  4. Put your binary/script with the name main into the folder. Make it executable (chmod +x main)!
  5. (Re)Start Chimera

Built With

Contributing

Just send in your pull request if you feel like it.

Versioning

SemVer is used for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Unlicense - see the LICENSE file for details.

Acknowledgments

  • Hat tip to anyone whose code was used!
  • Inspired by OpenLambda

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.