mml-io / mml-starter-project

MIT License
14 stars 23 forks source link

Updates for higher compatibility #12

Closed sachamorgese closed 1 year ago

sachamorgese commented 1 year ago

What kind of change does your PR introduce? (check at least one)

While trying to deploy on glitch, I discovered a couple of issues:

  1. The platform doesn't support Node 18, going only up to 16
  2. The getWebsocketUrl method in src/index.js assumes x-forwarded-port is always a string that represents a number, but being non-standardized, that is not always the case

This PR changes the required version to Node 16 and handles the case of x-forwarded-port being a comma-separated list of numbers, keeping the compatibility with the single number.

IMPORTANT: At the moment, Glitch isn't compatible with v0.1.1 since observable-dom uses fetch, which isn't available in node 16