- Blockchain By Example
- Bellaj Badr Richard Horrocks Xun (Brian) Wu
- 114字
- 2021-06-10 18:53:34
Project setup
After fulfilling the prerequisite steps, create a new directory dedicated to your project, as follows:
mkdir Bitcoin_payment && cd Bitcoin_payment
In your workspace, create two new subdirectories: a keys/ directory for storing your keys and certificate, and a views/ directory for storing the web pages and scripts.
To install all the requisite dependencies, create a package.json file from inside the Bitcoin_payment/ directory:
{
"scripts": {
"start": "node server.js"
},
"dependencies": {
"bitcore-lib": "^0.15.0",
"bitcore-payment-protocol": "1.2.2",
"body-parser": "^1.18.3",
"express": "^4.16.3",
"request": "^2.88.0",
"underscore": "^1.9.1"
}
}
Then run the following command:
npm install
This will install all the Node packages you need for setting up and running the project.