Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Problem accessing local deployment

default discord avatar
ricor51702 years ago
2

I run payload on a dedicated server (says with IP address IP_A). Then , I want to access it from my laptop.



An error happens for me when I point to



http://IP_A:3000/admin

on my laptop



In the devconsole, the call to API/users/me API endpoint fails and hangs. I tried to add a cord: '*' in the config but it did not work.



I cannot access it without doing a port forwarding. Is there another way to expose the port IP_A:3000 to any one?

  • discord user avatar
    alessiogr
    2 years ago

    Hey hey! Did you add the correct IP+Port to the

    serverURL

    field in your

    payload.config.ts

    ?


    And, could you share the exact error you're getting?

  • default discord avatar
    ricor51702 years ago

    I fixed it by removing the field

    serverUrl

    actually. I found an old issue reporting this on GH. Apparently, the

    create-payload-app

    script creates a wrong configuration.



    The error I am get is on the fetch request

    api/users/me

    . It fails to return a response while it should returns a null user.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.