Getting Started From Example
We offer carefully crafted starter templates with all the necessary configurations to help you embark on your journey with Axolotl.
📁 Available templates
Prefix | Default directory | Documentation |
---|---|---|
create-yoga | beerpub-yoga | Yoga GraphQL (opens in a new tab) |
create-federation-yoga | beerpub-federation-yoga | Yoga GraphQL (opens in a new tab) |
create-apollo-server | beerpub-apollo-server | Apollo Server (opens in a new tab) |
create-deno-yoga | /deno/examples/beerpub-yoga | Yoga GraphQL (opens in a new tab) [Deno][https://docs.deno.com (opens in a new tab)] |
🛫 Installation
To initiate a command, you must specify the prefix
from the table above.
The dir
argument is optional and represents the directory where the project will be created. If left unspecified, the project will be generated in the default
directory.
npx @aexol/axolotl [prefix] [dir]
For example
npx @aexol/axolotl create-yoga my-project
Will create the axolotl project using graphql-yoga
engine inside my-project
directory - simple!
🦕 Deno
This is just a scaffold command but you can run it with deno to :D
deno run --allow-env --allow-write --allow-read npm:@aexol/axolotl [prefix] [dir]
🛬 After installation
After installation, you can easily navigate to your project directory and execute npm run build
.
When the build is complete, you can start the server by executing npm run start
.
We have provided you with a straightforward example of a GraphQL server featuring a simple schema and a basic implementation, which operates on a JSON
file as a database.
🎉 Congratulations you have successfully created your first GraphQL server with Axolotl. 🎉