1
submitted 10 months ago* (last edited 10 months ago) by DonBubbles@lemmy.world to c/nodejs@programming.dev

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'));"

Find out more...

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 04 Nov 2023
1 points (100.0% liked)

Node.js

211 readers
4 users here now

founded 1 year ago
MODERATORS