judd

0.0.5 • Public • Published

judd

Poor mans serverless

Build Status

Judd sought autonomy and clarity for the constructed object and the space created by it, ultimately achieving a rigorously democratic presentation without compositional hierarchy. It created an outpouring of seemingly effervescent works that defied the term "minimalism"

[source] https://en.wikipedia.org/wiki/Donald_Judd

Overview

A POC and experiment in serverless style transient functions that can be loaded and and reloaded. There is no currently security so this is only suitable for experiments within a private network.

Todo

Test cli with process.exec Add security, change how functions are loaded. Allow loading functions from anywhere not just inside the modules directory. Maybe use the VM node.js module to sandbox running functions.

Command line usage

npm install judd -g

Launch the server

judd --listen

Add a function

Add functions to the modules directory where judd was installed globally on your machine.

judd --add --url demo --function demo.js

Now go to localhost:9999/demo

Reload a function

judd --add --url demo --function demo2.js

now go to localhost:9999/demo to see the new function, you must supply a different name for the module or file.

Module location

Load javascript functions from inside the /modules directory, if you have installed Judd globally that will be in different location on each operating system. You will be able to locate it with a bit of searching.

Module template

Judd simply associates a URL with the Event Emitter handler function fired by http.createServer...

 
var http = require('http');
 
var server = http.createServer(function this_one (req, res) {
    res.end('ok \n');
});
 

So a template is simply exporting a function with the request and response streams like so...

var crazy = require('crazy');
 
module.exports = function (req, res) {
    crazy(req, res);
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i judd

Weekly Downloads

1

Version

0.0.5

License

MIT

Last publish

Collaborators

  • m-onz