How to use the u-wave-web/middleware.default function in u-wave-web

To help you get started, we’ve selected a few u-wave-web 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 u-wave / core / example / index.js View on Github external
const config = require('./config.json');

const uw = uwave(config);

// Register your Media Sources. The API keys are configured in the config.json
// file.
uw.source(youTubeSource, config.youtube);
uw.source(soundCloudSource, config.soundcloud);

const secret = Buffer.from(config.secret);

const httpApi = createHttpApi(uw, {
  secret,
});

const webClient = createWebClient(uw, {
  apiBase: '/api',
});

const app = express();
const server = app.listen(port);

app.use('/api', httpApi);

createSocketServer(uw, {
  // This needs an HTTP server to attach the WebSocket server to.
  server,
  secret,
});

app.use(webClient);

u-wave-web

Web client for üWave servers.

MIT
Latest version published 1 month ago

Package Health Score

76 / 100
Full package analysis

Popular u-wave-web functions

Similar packages