How to use computer IP address when making request to lambda running offline?
Asked Answered
E

1

5

Hi I am trying to access my lambda using my computer's local IP address but am repeatedly getting a Connection refused error.

However if I use:

http://127.0.0.1:3000/my-path

the endpoint works fine.

Would anyone have any suggestions for what might be the problem?

Thanks!

Endoenzyme answered 2/6, 2019 at 8:32 Comment(0)
E
12

It turns out that I had to add the following in my serverless.yml:

custom:
  serverless-offline:
    host: '0.0.0.0'
Endoenzyme answered 2/6, 2019 at 8:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.