UNPKG

create-serve

Version:

🍛 Ultralight http server with live reload. [CLI + API]

7 lines (5 loc) 174 B
import { networkInterfaces } from 'os'; export const getIp = () => Object.values(networkInterfaces()) .flat() .find(ip => ip.family == 'IPv4' && !ip.internal).address;