Save / index.js
Hxbzbb7272's picture
Create index.js
5ecd196 verified
Raw
History Blame Contribute Delete
528 Bytes
const SHORT_URL = "https://tinyurl.com/2cnj72yj";
// Check SSLONLY env variable (like your bash logic)
if (!process.env.SSLONLY) {
console.log("\n\nNavigate to this URL:\n");
console.log(SHORT_URL);
} else {
console.log("SSLONLY is set, skipping URL output.");
}
console.log("\nPress Ctrl-C to exit ๐Ÿ›‘\n");
// Keep process alive
const interval = setInterval(() => {}, 1000);
// Handle Ctrl+C properly
process.on("SIGINT", () => {
console.log("\nStopping... ๐Ÿ›‘");
clearInterval(interval);
process.exit(0);
});