How to mix import and require in node.js
Name your file *.mjs and add this to the top:
import { createRequire } from 'module'
const require = createRequire(import.meta.url)
#javascript#NodeJS
you think twitter is going to get worse? how would that even work? no really, please publish a short dystopian sci fi story b/c i would love to read it
yo @Spotify I can't edit my display name at https://t.co/6NfJEZO6jP and this contains personal information that you took from a social login (instead of my chosen username)
Stripe docs say webhooks "might occasionally receive the same event more than once." Their suggested fix is idempotency. Implementation details? The api doc just links to "idempotent" on wikipedia 🤣
How to mix vuex / vue with HTML5 games Do you want a vue ui mixed with Babylon.js, Three.js, PIXI.js, canvas, Webgl, etc? Or maybe just to store some variables… or make reactive changes? Here’s how it works in a few of my games… There are 3... https://t.co/HVYHjpSySp
When deploying a VPS, if you set the DNS A record and give it an SSH key, you can avoid ever actually knowing the IP and password. It can just be "https://t.co/goTFplJmcB" as far as your code is concerned.
This was a joke about facebook but... if you're considering making a scalable multiplayer engine + webgl renderer (8000+ hours? $1.2mm+) consider whether it'll hold a candle to what I would make you for $25k-$50k with nengi.js + Babylon.js | Three.js in 2-4 wks
Hey mutuals if you're considering spending 15 billion on some metaverse tech you should hit me up first. There's a nengi.js template free on github that will get you halfway there by the end of the day.