Hosting multiple Vapid sites on DigitalOcean droplet

I’ve been having trouble getting different sites running on my droplet. Is there any way to change ports so they are not conflicting? Starting one, then trying to start the other I get port in use error

@Hadr619 Yes, you can either set a PORT environment variable, or if you want to hard-code the port, you can add it as an option in your package.json file. e.g.,

{
  "name": "example",
  "vapid": {
    "port": 4567
  },
  ...
}

awesome, was just learning about the environment variables. This helped a lot

1 Like

I’m having a problems hosting Vapid on DigitalOcean. I’ve followed this tutorial https://mallinson.ca/posts/12/vapid-on-digital-ocean, but when I want to create new site with “vapid new” and path to directory I get an error:

/usr/local/lib/node_modules/@vapid/cli/node_modules/bindings/bindings.js:133
  throw err;
  ^

Error: Could not locate the bindings file. Tried:
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/build/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/build/Debug/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/build/Release/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/out/Debug/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/Debug/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/out/Release/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/Release/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/build/default/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/compiled/8.15.0/linux/x64/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/addon-build/release/install-root/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/addon-build/debug/install-root/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/addon-build/default/install-root/sharp.node
 → /usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/lib/binding/node-v57-linux-x64/sharp.node
    at bindings (/usr/local/lib/node_modules/@vapid/cli/node_modules/bindings/bindings.js:124:9)
    at Object.<anonymous> (/usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/lib/constructor.js:10:34)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@vapid/cli/node_modules/sharp/lib/index.js:3:15)

Any suggestions? Using NodeJS version 10.15.1.