nginx: use environment variables

With NGINX Docker image Apply envsubst on template of the configuration file at container start. envsubst is included in official NGINX docker images. Environment variable is referenced in a form $VARIABLE or ${VARIABLE}. nginx.conf.template: user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { server { listen 80; location … Read more

How would you launch a browser from the a node.js command line script [duplicate]

Open exists now, use that. 🙂 Install with: $ npm install –save open Use with: const open = require(‘open’); // Opens the image in the default image viewer (async () => { await open(‘unicorn.png’, {wait: true}); console.log(‘The image viewer app closed’); // Opens the url in the default browser await open(‘https://sindresorhus.com’); // Specify the app … Read more