Socket
Socket
Sign inDemoInstall

webapp

Package Overview
Dependencies
0
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

webapp

Make a webapp out of anything


Version published
Weekly downloads
201
decreased by-50%
Maintainers
0
Created
Weekly downloads
 

Readme

Source

#!/usr/bin/env node

var http = require('http') , webapp = require('./webapp');

http.createServer(webapp.bind([])).listen(8000); // ^^^^^^^^^^^^^^^ // | (x) // ROFLSCALE DEQUE ---/

// http://localhost:8000/push/1 -> 1 // http://localhost:8000/push/2/3 -> 3 // http://localhost:8000/unshift/4 -> 4

// http://localhost:8000/ -> [ "4", "1", "2", "3" ]

// http://localhost:8000/pop -> "3" // http://localhost:8000/shift -> "4"

function Thing() { } Thing.prototype.set = function(k, v) { return this[k] = v; }; Thing.prototype.get = function(k) { return this[k]; }; http.createServer(webapp.bind(new Thing())).listen(8001); // ^^^^^^^^^^^^^^^^^^^^^^^^ // | (x) // ROFLSCALE NOSQL DB ---/

// http://localhost:8001/set/name/joe -> "joe" // http://localhost:8001/set/age/30 -> "30"

// http://localhost:8001/ -> {"name":"joe","age":"30"}

// http://localhost:8001/get/age -> "30"

FAQs

Last updated on 13 Mar 2011

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc