diff --git a/README.md b/README.md index 69ba290..bc6dc4b 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ You can then `require('canvas-confetti');` to use it in your project build. _Not You can also include this library in your HTML page directly from a CDN: ```html - + ``` _Note: you should use the latest version at the time that you include your project. You can see all versions [on the releases page](https://github.com/catdad/canvas-confetti/releases)._ diff --git a/build/serve.js b/build/serve.js index 65be6af..8dd302d 100644 --- a/build/serve.js +++ b/build/serve.js @@ -2,6 +2,7 @@ const path = require('path'); const http = require('http'); const send = require('send'); const root = require('rootrequire'); +const { networkInterfaces } = require('os'); const PORT = 9001; @@ -25,7 +26,13 @@ http.createServer(function (req, res) { send(req, file).pipe(res); }).listen(PORT, () => { - console.log(`listening at http://localhost:${PORT}`); + console.log('listening at:'); + console.log(` http://localhost:${PORT}`); + + Object.values(networkInterfaces()) + .reduce((memo, value) => [...memo, ...value], []) + .filter(value => value.family === 'IPv4') + .forEach(({ address }) => console.log(` http://${address}:${PORT}`)); }); diff --git a/index.html b/index.html index 06ea0df..e2941f9 100644 --- a/index.html +++ b/index.html @@ -8,8 +8,9 @@ + -
- You can combine multiple calls to confetti with any settings in order to create - a more complex effect. Go ahead, combine different shapes, sizes, etc. Stagger them - for an extra boost of excitement. + Why click a button repeatedly when you can have code do it for you? Shoot some firework + of confetti from the sides of page so you can still read the content in the center.
-✨ Celebrate with a burst of stars! ✨
- Why click a button repeatedly when you can have code do it for you? Shoot some firework - of confetti from the sides of page so you can still read the content in the center. + You can combine multiple calls to confetti with any settings in order to create + a more complex effect. Go ahead, combine different shapes, sizes, etc. Stagger them + for an extra boost of excitement.
+✨ Celebrate with a burst of stars! ✨