You will need to sign up for a Heroku account, and a Google Cloud Platform account and create a bucket in Google Cloud Storage where you wish to store your (mutable) NFT metadata.
You will need to specify the following environment variables in your Heroku project:
- GOOGLE_STORAGE_PROJECT //your GCP project name
- GOOGLE_STORAGE_BUCKET //the bucket you wish to use for this project
- BASE_URL //the public URL for your Google Cloud bucket
- METADATA_PATH //the path where you want to store the metadata within your bucket
Follow the instructions here to create and deploy the app on Heroku.
This app will serve as the metadata API for your non-fungible token. Take note of the URL for your Heroku project and use it as your "baseTokenURI" in your NFT smart contract. Also, be sure to reference this URL whenever you mint a token.
To create a new token:
Send a POST request with a JSON payload containing the metadata you would like your NFT to reference to: https://your-heroku-app.herokuapp.com/api/your-token-name/create/token-id replacing your-heroku-app with the name of your app, your-token-name with the name of your token you specify in your endpoints, and token-id with the numerical tokenId generated by the NFT.
To get the metadata for a token:
Send a GET request to: https://your-heroku-app.herokuapp.com/api/your-token-name/token-id substituting the same values as above.