A self-contained Docker image is provided which starts a Stacks 2.0 blockchain and API instance.
Ensure Docker is installed, then run the command:
docker run -p 3999:3999 blockstack/stacks-blockchain-api-standalone
Similarity, a "mocknet" instance can be started. This runs a local node, isolated from the testnet/mainnet:
docker run -p 3999:3999 blockstack/stacks-blockchain-api-standalone mocknet
Once the blockchain has synced with network, the API will be available at: http://localhost:3999
First, ensure Docker is installed on your machine.
Clone repo and install dependencies with npm install
.
Run npm run dev:integrated
.
This command will concurrently start the API server app and the service dependencies.
Check to see if the server started successfully by visiting http://localhost:3999/extended/v1/status
Then run npm run devenv:deploy
which uses docker-compose to deploy the service dependencies (e.g. PostgreSQL, Blockstack core node, etc).
To run the server in 'watch' mode (restart for every code change), run npm run dev:watch
. You'll have a server on port 3999.