aws-amplify / amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
https://docs.amplify.aws/
Apache License 2.0
81 stars 71 forks source link

Feature Request: Enable port selection for amplify mock #384

Open jkahn117 opened 4 years ago

jkahn117 commented 4 years ago

Is your feature request related to a problem? Please describe.

Using Amplify mock feature in Cloud9. Currently, the mock IDE only runs on port 20002. Cloud9 only exposes ports 8080, 8081, and 8082 without opening Security Groups, etc. to expose a broader range of ports.

Describe the solution you'd like

Enable a toggle to select running port for the mock GraphQL IDE. In reviewing the code, it seems this should be possible by adding a command line argument and passing through to the start method.

Describe alternatives you've considered

IPTables in Cloud9, not successful. Alternative is a more complex Cloud9 networking configuration.

imgntn commented 4 years ago

I ran into this doing work locally on two different amplify projects - they both want to do the mock api on port 20002, so I'm unable to mock more than one project at a time.

lr001dev commented 4 years ago

I'm not sure how to view the mock server when running amplify mock on the cloud9.. It seems to create the sever ok, however, when viewing in the browser it timesout... Any suggestions?

iJebus commented 3 years ago

On a related note to this, being able to specify the host address would be great. Currently using VSCode Remote-Containers and amplify mock is binding to the container's internal IP, which isn't accessible.

esteban-serfe commented 1 year ago

+1

peteromano commented 1 year ago

This is still an Open issue? Really?! Just make the port configurable..

Bandisa commented 1 year ago

This will also help with local integration scripts testing, minimising api calls to the deployed version of what you are testing, so that when you do finally test, you can just switch the local address to the live.

So can we please get this feature.