JSON Server is a simple, yet powerful tool for setting up a REST API with a mock database using JSON files.
Prerequisites
-
Akash Wallet and AKT Tokens: You’ll need an Akash wallet with some AKT tokens to deploy your service.
-
Akash CLI: Install the Akash CLI to interact with the network. Alternatively, you can deploy via the Akash Console
Prepare the Akash Deployment
This is assuming you would be using the Akash CLI.
- Create a deployment YAML file:
Download and edit the YAML file here.
- Deploy the application:
- View deployment status:
- Access the JSON Server:
Once your deployment is active, the output will provide an IP address or domain where your JSON Server can be accessed. You can navigate to http://
Verify and Interact with the JSON Server
To verify everything is working, you can use curl or simply navigate to the endpoint provided:
This should return the contents of your db.json
file.