An example GraphQL Yoga project to get you started with plugin-better-auth.
- Clone the project by using Git:
git clone https://github.com/Nexirift/plugin-better-auth-example - Install packages using bun:
bun install - Copy
.env.exampleto.env - Apply migrations using:
bun migrate - Start the server using:
bun dev - Visit
http://localhost:3008/user - Copy the value in
tokenfor later use - Send a test request below
curl --request POST \
--url http://localhost:3008/graphql \
--header 'Authorization: Bearer TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{"query":"query hello {\n\thello\n}","operationName":"hello"}'Replace TOKEN_HERE with the actual token