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 configurationso where it says
Payload Admin URL: /adminshould be the clickable url like
http://localhost:8000/admin/If you set the
serverURLvalue, 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.
nice, I see it now after adding serverURL to config file
after adding serverURL, I kept getting
CORS Missing Allow Originerror
had to remove that for the server to work
Yeah, there are further implications to changing that.
Another option is to hard-code whatever you'd like into the
onInitfunction 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
Discord
online
Get dedicated engineering support directly from the Payload team.