Update path

This commit is contained in:
Tobias Hopp 2021-08-27 07:41:23 +02:00
parent fe941c6433
commit ecb804fe4c

View File

@ -63,7 +63,7 @@ app.get( '/api/getDevices', async ( req, res ) => {
// Read the dnsmasq file // Read the dnsmasq file
console.log( 'Loading all devices...' ); console.log( 'Loading all devices...' );
const fileStream = fs.createReadStream('/home/tobias/IdeaProjects/network-devices/dnsmasq.leases' ); const fileStream = fs.createReadStream('/var/lib/misc/dnsmasq.leases' );
const rl = readline.createInterface( { input: fileStream, crlfDelay: Infinity } ); const rl = readline.createInterface( { input: fileStream, crlfDelay: Infinity } );
let data = []; let data = [];
@ -96,4 +96,4 @@ app.get( '*', ( req, res ) => {
res.end(); res.end();
} ); } );
app.listen( port, () => { console.log( "Server started!" )} ); app.listen( port, () => { console.log( "Server started!" )} );