node.js websocket and ssl and rights...

TestUser

Verified User
Joined
Aug 26, 2011
Messages
220
hey all...
im developing a website that has a node.js server with an websocket connection,,..
all working great... until I try to connect over SSL connection...
the website is using letsencrypt SSL certificate
seems I have issues with permissions
right now I runn the node.js backend as root...
any ideas on how/what to...
thank you in advance
 
i have found the solution....
pm2 has an option
you create a file ecosystem.config.js
this is an example
Code:
module.exports = {
  apps : [{
    name: 'my-app',
    script: './filename_of_your_app.js',
    user: 'username_you_want_to_run',
    watch: true,
    instances: 1,
    autorestart: true,
    max_memory_restart: '1G',
    env: {
      NODE_ENV: 'development'
    },
    env_production: {
      NODE_ENV: 'production'
    }
  }]
};
 
Back
Top