How to use the @laconia/event.parseWebSocket function in @laconia/event

To help you get started, we’ve selected a few @laconia/event examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github laconiajs / laconia / packages / laconia-adapter-api / src / createWebSocketAdapter.js View on Github external
const createWebSocketAdapter = () => app => async (event, laconiaContext) => {
  try {
    const output = await app(parseWebSocket(event), laconiaContext);
    return res(output);
  } catch (err) {
    return res(err.message, 500);
  }
};