This quick start is intended for intermediate to advanced developers, already familiar with the technology used. For a more in-depth introduction to Subsquid, head to our tutorial!
Getting started
Pre-requisites
node 16.x
docker
For more information on how to set up the Development Environment, take a look at the Tutorial on this topic​
Create the database the Squid is configured to work with
1
npx sqd db create
Copied!
Apply database migrations to the database
1
npx sqd db migrate
Copied!
Launch the Processor
This command will block the terminal, fetching chain data transforming and storing it in the target database
1
node -r dotenv/config lib/processor.js
Copied!
Start the GraphQL server
In a new terminal window
1
npx squid-graphql-server
Copied!
To learn how to deploy your project to our Cloud-hosted solution, head over to the dedicated tutorial.
The GraphQL playground
Once the GraphQL server has started, you can visit the http://localhost:4350/graphql URL in a browser window, to start testing to query data, thanks to the GraphQL playground available.