Get started with node-waves CDN

MIT licensed

Node-waves: Lightweight library for Web Audio API sine wave oscillators.

Tags:
  • click
  • material-design

Stable version

Copied!

How to start using node-waves CDN


const express = require('express');
const path = require('path');
const bodyParser = require('body-parser');
const Waves = require('waves.min');

const app = express();
app.use(bodyParser.json());
app.use(express.static(path.join(__dirname, 'public')));

app.get('/', (req, res) => {
  res.sendFile(path.join(__dirname, 'public', 'index.html'));
});

app.listen(3000, () => {
  console.log('Server listening on port 3000');
});

app.use((req, res, next) => {
  Waves.init({
    selector: '.waves-effect',
    options: {
      rippleColor: '#fff',
      rippleOpacity: 0.5,
      rippleDuration: 1000,
    },
  });
  next();
});
Copied!
Copied!
Copied!
Copied!
Copied!

All versions