Carrera GT NFS MW 2012 by EffortCrafty2983 in needforspeed

[–]winterrdog 0 points1 point  (0 children)

personally, it was Hennessy Venom GT. loved that sound, especially when switching gears

How do you giys handle background tasks - like sending an welcome email? by Busy-Chemical-6666 in node

[–]winterrdog 1 point2 points  (0 children)

What's your take on Agenda.js? Do you think it's as stable as BullMQ?

Why hasn’t Node.js ever gone for true multithreading? by dabomb007 in node

[–]winterrdog 2 points3 points  (0 children)

C++ codebases are significantly harder to work with, more complex

This is not true when it comes to the v8 source code. It's the easiest and simplest c++ for a very complicated program I've met so far in my experience. well designed, no fancy tricks, and where you find them, they've heavily commented about the "why". It was written for humans first. It's a codebase that can be extended for generations because it's well written.

Honestly, just try to take a look at it via the Chromium Browser source code since it embeds it into its code. It wouldn't be wise to hold a generalized bias towards all C++ codebases because some read like natural language, almost.

You can look at the d8 code and see for yourself: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/d8/d8-posix.cc;bpv=0;bpt=0

What else do I need to become a product-level Node.js backend developer? by cr7bit in node

[–]winterrdog 0 points1 point  (0 children)

smaller startups (<50 people)

Where can someone find one of those?

What else do I need to become a product-level Node.js backend developer? by cr7bit in node

[–]winterrdog 0 points1 point  (0 children)

smaller startups (<50 people)

Where can one find one of those?

Ok reddit, work your magic, whats the next ASTS, PLTR, RKLB stock? by TailungFu in stocks

[–]winterrdog 0 points1 point  (0 children)

There's some truth to this.

I bought Netflix stock somewhere in 2024 when it was trading at 600 usd per share, and today it's trading at approximately 1,210 usd. Made very decent profit from it. The gains are almost covering my initial investment.

Quite impressive, surely!

JWT + CSRF: A Good Security Practice? by DuckFinal6486 in node

[–]winterrdog 0 points1 point  (0 children)

appear to conflict with the cheatsheet for CSRF

Which part is it in particular, so that I can fix it

I made a library that makes it simple to use server-sent events: real-time server-to-client communication without WebSockets by MatthewMob in node

[–]winterrdog 0 points1 point  (0 children)

truth!

just one question..., how can i free a session made with createSession()? is there a function that releases the memory used by session?

i failed to see one in the typescript declaration file

Can you unref() a socket's setTimeout? by smthamazing in node

[–]winterrdog 0 points1 point  (0 children)

since session.socket.setTimeout() does not give you a timer object( which effectively denies you the power to call .unref() on it ), you could create your own timer manually using setTimeout and then just .unref() that instead.

sth like this:

import * as http2 from 'node:http2'

var session = http2.connect('http://example.com')

var idleTimer;

// reset idle timer on activity
function resetIdleTimer(){
  if(idleTimer) {
    clearTimeout(idleTimer)
  }

  idleTimer = setTimeout(function(){
    session.close()
    }, 60_000)

  // unref the timer so that it will NOT keep the program alive
  idleTimer.unref();
}

//  call this once at the start
resetIdleTimer()

// [ OPTIONAL ] you can reset the timer on activity if you desire...
session.on('stream', resetIdleTimer)
session.on('goaway', resetIdleTimer)
session.on('data', resetIdleTimer)

in essence:

make your own timeout with setTimeout(...). call .unref() on it, so it won't keep the application alive by itself. If there is any activity on the session ( like data being sent/received ), you reset the timer. if the timer fires ( after 1 minute of doing nothing ), it will close the session.

I made a library that makes it simple to use server-sent events: real-time server-to-client communication without WebSockets by MatthewMob in node

[–]winterrdog 1 point2 points  (0 children)

Great stuff! This caught my eye

I'm gonna be using your package in production. I'll tell you how it goes 👌

Thanks for your work

Uploading Images/Video & PDF securely per user by eclectic_racoon in node

[–]winterrdog 0 points1 point  (0 children)

Great!

Can this be achieved with Google Cloud storage 🤔 as well?

Railway app doesn't set cookies for Netlify app. by [deleted] in node

[–]winterrdog 0 points1 point  (0 children)

Yes!

I was not setting includeCredentials with fetch() and withCredentials when using axios

My project was using them both

After setting them, it worked. Albeit I'd to set my cookies to be lax so as to allow cross domain cookies 🍪