mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 13:48:40 +00:00
fix: dont bail when ip cannot be determined (happens when no wifi)
This commit is contained in:
parent
aabc82bedd
commit
c639e44ca7
@ -99,12 +99,6 @@ Object.keys(networkInterfaces).forEach((key) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!IP) {
|
|
||||||
console.error("Unable to determine server's IP address.");
|
|
||||||
// eslint-disable-next-line
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
server.listen(PORT, IP_ADDRESS, () => {
|
server.listen(PORT, IP_ADDRESS, () => {
|
||||||
console.log(`@strudel/sampler is now serving audio files from:
|
console.log(`@strudel/sampler is now serving audio files from:
|
||||||
${directory}
|
${directory}
|
||||||
@ -113,6 +107,6 @@ To use them in the Strudel REPL, run:
|
|||||||
samples('http://localhost:${PORT}')
|
samples('http://localhost:${PORT}')
|
||||||
|
|
||||||
Or on a machine in the same network:
|
Or on a machine in the same network:
|
||||||
samples('http://${IP}:${PORT}')
|
${IP ? `samples('http://${IP}:${PORT}')` : `Unable to determine server's IP address.`}
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user