This project houses the API to access the Liberland blockchain.
- Compatible Node.js and NPM versions. See the
enginesproperty of thepackage.jsonfile for which versions of each you should be running.If you're not running those versions, you can use version managers such as
nvmornto set up those versions.
Install all the necessary packages by running:
npm iTo generate PDF files, you'll need to install Wkhtmltopdf. This tool is essential for converting HTML pages to PDF format.
- On Linux:
Run the following command in your terminal:
sudo apt-get -y install wkhtmltopdf
In order to sign webhooks messages, you need to generate keys using these two commands (keys are not committed):
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048openssl rsa -pubout -in private_key.pem -out public_key.pemShare public_key with any API consumers that need to verify the API results
To run the development server:
npm startOnce loaded, the website should be available on port 8060 of your local machine. For example, http://localhost:8060.
The blockchain, centralized API (deployed on your local machine or connected to testnet) should be setup as well.
##Deployment
set environment in package.json pm2 start npm --name staging-middleware -- start