Hi, I have a next js vercel project where I used npx next-payload install to extend payload to my project. I know you can do /admin to go to the page and login. However, is there a way to assign a different route name instead of /admin? Thanks.
Good morning @BrandonMager - you can customize the built-in routes on your Payload config object.
The config in
payload.config.js
has a "routes" property that accepts an object
For example, one I use on a personal project
routes: {
api: "/payload/api",
admin: "/payload/admin",
graphQL: "/payload/graphql",
graphQLPlayground: "/payload/graphql-playground",
},
Let me know if tht answers you question, happy to help
Hey @BrandonMager did you have a chance to try the above suggestion? Let us know if you have any follow up questions here. Thanks!
Hey @seanzubrickas I looked at the example and the suggestion almost worked I just needed to add a serverURL in the payload.config so that the routes are connected properly
nice! so you got it sorted out?
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.