Node API endpoint
Obtain Certificate
The first step is to obtain a certificate from a certificate authority such as Let's Encrypt. Let's Encrypt is a free, automated, and open certificate authority that provides SSL/TLS certificates. To obtain a certificate, you will need to run a certificate management tool such as Certbot.
Modify 'start.sh' script
After obtaining the certificate, you need to modify the 'start.sh' script by appending the following lines:
--access-control-allow-headers=* \
--https-certificate="PATH_TO_KEY_DIRECTORY/fullchain.pem" \
--https-private-key="PATH_TO_KEY_DIRECTORY/privkey.pem" \
--https-server-address 0.0.0.0:443 \
Replace the placeholders with your own information, save the file and exit.
Restart Nodine process
To restart the Nodine process, you need to stop the current process by executing the './stop.sh' script and then start it again by executing the './start.sh' script.
Test
To test if the API endpoint is working correctly, you can follow these steps:
- Check if the Nodine process was restarted correctly by tailing the 'nodine.log' file with the command 'tail -f nodine.log'
- Check if the API is working properly by entering the URL in your browser: 'https://DOMAIN_NAME/v1/chain/get_info'
Note: Make sure to replace 'DOMAIN_NAME' with your actual domain name.