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.

can we add website admin url in the terminal?

default discord avatar
generator1013 years ago
3

When launching the dev server, can we add the admin url in the terminal logs please?



[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts
[nodemon] starting `ts-node src/server.ts`
[04:06:51] INFO (payload): Connected to Mongo server successfully!
[04:06:51] INFO (payload): Starting Payload...
[04:06:53] INFO (payload): Payload Admin URL: /admin
[04:06:54] INFO (payload): E-mail configured with mock configuration


so where it says

Payload Admin URL: /admin

should be the clickable url like

http://localhost:8000/admin/
  • discord user avatar
    denolfe
    3 years ago

    If you set the

    serverURL

    value, this URL will be complete and clickable. The reason this isn't always filled out is that the application could be behind nginx or something similar - so no guarantee the URL is correct.

  • default discord avatar
    generator1013 years ago

    nice, I see it now after adding serverURL to config file



    @967118574445547650

    after adding serverURL, I kept getting

    CORS Missing Allow Origin

    error



    had to remove that for the server to work

  • discord user avatar
    denolfe
    3 years ago

    Yeah, there are further implications to changing that.



    Another option is to hard-code whatever you'd like into the

    onInit

    function inside

    payload.init

    . This is what is currently logging that message for you. You can modify as needed:


      onInit: () => {
        payload.logger.info(`Payload Admin URL: ${payload.getAdminURL()}`)
      },
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.