简体   繁体   中英

How can I access application deployed on localhost of AWS remote server?

I have developed a set of apis on my AWS server. When I do npm start , application is started on a particular port of aws localhost. I am able to hit the apis using curl command from my terminal window. eg:

curl -s -X GET \
"http://localhost:6001/getAssetDetails?assetId=1"\
-H "content-type: application/json"

How to access the apis from my host system using postman installed on my host machine?

How to access localhost applications of AWS server from web browser of windows host? What URL should I hit from my host machine?

You have to add Inbound rules in Access control list (ACL) of your EC2 instance. Ports are blocked by default in aws server. This might help aws-doc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM