serverless-appsync / serverless-appsync-simulator

A simple wrapper around Amplify AppSync Simulator to test serverless AppSync Apis
MIT License
127 stars 69 forks source link

fix: convert port to number type #185

Open hiramatsutaku opened 1 year ago

hiramatsutaku commented 1 year ago

When using multiple APIs, port is incremented.(See: https://github.com/serverless-appsync/serverless-appsync-simulator/pull/92) However, when I specified port from the environment variable, it became a string and could not be incremented, resulting in the following error.

❯ APPSYNC_PORT=20004 npx sls offline start
AppSync Simulator: Error: Port 2000410 is already in use. Please kill the program using this port and restart Mock
...

So, I fixed this even if port/wsPort is specified from an environment variable.