Skip to content

Instantly share code, notes, and snippets.

@keksipurkki
Created October 15, 2023 16:34
Show Gist options
  • Save keksipurkki/53a60abbbdf86a799e326ec407431945 to your computer and use it in GitHub Desktop.
Save keksipurkki/53a60abbbdf86a799e326ec407431945 to your computer and use it in GitHub Desktop.
hello_world.mjs
#!/usr/bin/env node
import * as readline from "node:readline/promises";
const { stdin: input, stdout: output } = process;
const rl = readline.createInterface({ input, output });
const name = await rl.question("What is your name? ");
console.log(`Hello there, ${name}`);
rl.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment