[WIP] A Thai politics database
- Nuxt
- Better-Auth
- Apollo GraphQL Server
- Neo4J
Add following variables to the .env
NEO4J_HOST=localhost
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=<SOME_PASSWORD>
BETTER_AUTH_URL=http://localhost:3000
BETTER_AUTH_SECRET=<RANDOM_STRING>
npm i # Install dependencies for the first time
npm run dev
Make a POST request to /auth/sign-up/email
with the body:
{
"name": "*****",
"email": "*****",
"password": "*****"
}
GraphQL is available at /graphql
with a playground enabled on the local environment.
GraphQL required user account for write permission. To make an update to GraphQL outside the Politigraph website, make a POST request to /auth/sign-in/stateless
with the body to get the token.
{
"email": "*****",
"password": "*****"
}
Then you can include the token in Authorization: Bearer <token>
headers of GraphQL request to get the write permission.