iconify / api

Iconify API script. Search engine for icons, provides icon data on demand for icon components, dynamically generates SVG.
MIT License
96 stars 34 forks source link

Support for setting host setting #6

Closed markus-li closed 1 year ago

markus-li commented 1 year ago

In some environments it could be beneficial to only listen to a specific interface, such as localhost or a LAN instead of WAN interface. Basically just a matter of adding the following:

// Create server
app.server.listen(app.config.port, app.config.host, () => {
    app.log('Listening on port ' + app.config.host + ':' + app.config.port);
});

and setting app.config.host = '0.0.0.0' by default to keep the current behavior intact.

Would you accept a pull-request for this?

cyberalien commented 1 year ago

Sure. PRs for new features are welcome.

I'm rewriting API right now and will also add similar feature to new version.

markus-li commented 1 year ago

Ok, I'll fork and create a pull request hopefully over the weekend. Looking forward to seeing your new version.

cyberalien commented 1 year ago

Implemented in version 3.

Configuration can be set: