On this page we are going to guide you through getting started with Graphweaver. Before we start the installer make sure you are running:
- Node
>18.*
- PNPM
>8.*
With those two installed you can create a new project with the Graphweaver CLI, by running:
npx graphweaver@latest init
The prompts will ask you which backends to install for this app.
First you will be asked to name the project:
? What would your like to call your new project?
test-project
Next, you will be asked to choose your data source. Select your data source and press enter.
? Which Graphweaver backends will you need?
◯ MikroORM - PostgreSQL Backend
◯ MikroORM - MySQL Backend
◯ MikroORM - SQLite Backend
◯ REST Backend
Finally, confirm that the project is going to be created:
? OK, we're ready- I'm going to create a new app in "/Users/test-project" - is that OK?
Yes
All Done!
Make sure you npm install / yarn install / pnpm install, then run the start script to get started
❯
Once the new app has been created cd test-project
. Then run pnpm install
to install all the required dependencies.
Once installed, you can start the development server by running pnpm start
.
This will launch the Graphweaver server and Admin UI at http://localhost:9000:
Very empty! We need to fill the API with data! To do that, we need to connect the data source and create some entities.
Next Steps
There are two options to connect a data source:
- If you have an existing database (Postgres, MySql or Sqlite) then go to the Importing a Database page. This will guide you through importing your database.
- If you have a data source but it is currently empty then go to How to Connect a Data Source page.