<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[wlan0 IP address in config file]]></title><description><![CDATA[<p dir="auto">I want to open the server with the first IP address of the wlan0 network by putting ifaces.wlan0[0].address in the address part of the config.js file. I modified the code to do this, but I get an error on the screen.</p>
<pre><code>const os = require("os");

const ifaces = os.networkInterfaces();
const wlan0Address = ifaces.wlan0[0].address;

let config = {
    address: wlan0Address, // The first IP address of the wlan0 network interface
    port: 8080, 
    // etc...
};
</code></pre>
<p dir="auto">If I write the code as above, I don’t know why, but when I open the server, I don’t see any module screen on the web server. So I thought the modules were a problem, so I modified the code as follows, and the modules come out well from the web server at that address.</p>
<pre><code>/*const os = require("os");
const ifaces = os.networkInterfaces();
const wlan0Address = ifaces.wlan0[0].address;
*/
let config = {
    address: "xxx.xxx.xxx.xxx", // static address
    port: 8080, 
    // etc...
};
</code></pre>
<p dir="auto">The conclusion that I came up with through this process is</p>
<pre><code>const os = require("os");
const ifaces = os.networkInterfaces();
const wlan0Address = ifaces.wlan0[0].address;
</code></pre>
<p dir="auto">I think the code in the above part is problematic, I want to know exactly what the problem is with this code, and how to fix the code to solve it.</p>
<p dir="auto">In addition, since English is not the main language, I hope you understand that my writing may have some grammatical errors.</p>
]]></description><link>https://forum.magicmirror.builders/topic/18115/wlan0-ip-address-in-config-file</link><generator>RSS for Node</generator><lastBuildDate>Sat, 08 Aug 2026 16:45:37 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/18115.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Oct 2023 05:41:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to wlan0 IP address in config file on Fri, 17 Nov 2023 13:37:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hikano765" aria-label="Profile: hikano765">@<bdi>hikano765</bdi></a> a better thing would be to change the address: to address:“0.0.0.0”<br />
then it will listen on all the active network adapters .</p>
<p dir="auto">you will also have to fix the ipWhitelist to allow apps from outside systems to connect</p>
<p dir="auto">while you are developing your mm solution it’s easiest to do<br />
ipWhitelist:[],</p>
<p dir="auto">to allow apps from any system on your local betwork</p>
]]></description><link>https://forum.magicmirror.builders/post/111988</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/111988</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 17 Nov 2023 13:37:12 GMT</pubDate></item></channel></rss>