Skip to content

Instantly share code, notes, and snippets.

@arlolra
arlolra / server.js
Created January 28, 2012 23:50 — forked from isaacs/server.js
// test with:
// curl -X POST -d '{ "to" : "isaacs", "from" : "arlolra", "body" : "emoji 🍨 🍩 🍪"}' http://127.0.0.1:1337
var http = require("http")
// messages should be relatively short.
var maxLength = 1024
var server = http.createServer(function (req, res) {
// requests come in as json
@arlolra
arlolra / LICENSE.txt
Created May 23, 2011 05:34 — forked from jed/LICENSE.txt
communicate with jsonp
Copyright (c) 2011 Jed Schmidt, http://jed.is
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: