postmessage-server
v0.2.0
Published
A server implementation for postMessage communication
Downloads
3
Readme
postmessage-server
Installation
npm install --save postmessage-server
Usage
es6
import Server from 'postmessage-server';
const pmServer = new Server([
{
path: "test/route",
handler: (req, res) => res.send('OK')
}
]);
pmServer.listen(window);
es5
var PMServer = require('postmessage-server');
var pmServer = new PMServer([
{
path: "test/route",
handler: function (req, res) { res.send('OK'); }
}
]);
pmServer.listen(window);