Very happy that with the new --experimental-default-type module
in Node.js v21 I can write my little helper commands, that I run directly in the terminal using --eval
/-e
, in ESM syntax now. E.g. to generate a hex JWT secret:
node --experimental-default-type module -e "import crypto from 'node:crypto'; console.log(crypto.randomBytes(32).toString('hex'));"
You must log in or register to comment.