node-postmessage-server
v0.1.1
Published
A server implementation for postMessage communication
Downloads
4
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);