How to use the hostile.HOSTS function in hostile

To help you get started, we’ve selected a few hostile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github redhataccess / spandx / app / inits / cp / init.js View on Github external
"api.qa.foo.redhat.com",
        "api.stage.foo.redhat.com",
        "api.prod.foo.redhat.com"
    ];

    try {
        await set("127.0.0.1", hostnames.join(" "));
        console.log(
            `Added ${c.fg.l.cyan}cp${c.end} hostnames to ${hostile.HOSTS}`
        );
    } catch (e) {
        console.error(
            `Unable to write ${
                hostile.HOSTS
            }.  Either try again with sudo, or copy the following into your ${
                hostile.HOSTS
            } file.
            `
        );
        console.error(`127.0.0.1 ${hostnames.join(" ")}`);
    }
}

hostile

Simple /etc/hosts manipulation

MIT
Latest version published 10 months ago

Package Health Score

64 / 100
Full package analysis