PHP Code to Node.js Code Conversion

  • Banned

    I have the following piece of code:

    session_set_cookie_params(0, '/', '');
    if(!isset($_SESSION["auth"])) {
      $_SESSION["auth"] = true;

    How can I convert this to Node.js and where should I place it so that all requests to my NodeBB forum pass through this? I can't figure out how to do this.

  • Assuming that you use it as a reverse proxy, I think you can do something similar with NGINX by mixing these guides:


Suggested Topics

  • 4
  • 3
  • 2
  • 3
  • 11
| |