This example uses the next-gen web framework Fresh — learn more
- Make sure you have Deno installed and ready to go first.
- Run
npx degit grafbase/grafbase/examples/fresh grafbase-with-freshto clone this example - Change directory into the new folder
cd grafbase-with-fresh - Run
cp .env.example .envto copy the example.env.examplefile to.env - Open
.envin your code editor and provide your Grafbase API endpoint and API key. Example should be fine fornpx grafbase dev! - Run
npx grafbase@latest devin your terminal - Populate the backend with some
Messageentries using a GraphQL mutation:
mutation {
messageCreate(
input: { author: "Grafbase Admin", message: "Grafbase is awesome!" }
) {
message {
id
}
}
}- In another terminal, run
deno task startand visithttp://localhost:8000
To learn more about Grafbase, take a look at the following resources:
- Grafbase - learn about Grafbase features and API.
To learn more about Deno and Fresh, take a look at the following resources:
- Fresh Documentation - learn about Fresh.
- Learn Deno - learn more about Deno.