Populate the three collections above with the information from the database.
- Variables will be Bronze, Silver, Gold and the labels / additional text.
- The information to be populated beneath the image from the database are:
- Percentage of Ownership
- Number of the collection remaining
- Price (in USD)
- Perks within each token
- Status - to be enabled or disabled
The API has been built with:
- Express.js framework (Node v18)
- Postgresql Database
- To preview the UI, proceed to https://master.d2jrcp5smfrdab.amplifyapp.com/ .
- To access the API hosted on the Render cloud platform -->> https://fantium.onrender.com/
- Fetch Collections data from a postgresql db
- db
- collection_id
- perks
- percentage_ownership
- price
- status
- number_collection_remaining
- Ensure you have installed Node v18.
- Clone the repo in your local machine.
- Navigate to the project folder(./api)
- Install all the requirements of the project by typing:
npm install
-
HOST_NAME='your_host_name_here'
-
HOST_PORT='your_host_port_here'
-
NAME='your_user_name_here'
-
DATABASE='your_database_name_here'
-
PASSWORD='you_database_password_here'
-
INFURA_ID='your_infura_id_here'
-
Type in terminal:
npm run dev
Resource URL | Methods | Description |
---|---|---|
/ | GET | Home |
/collections | GET | Collections |