FlightSurety is a sample application project for Udacity's Blockchain course.
This repository contains Smart Contract code in Solidity (using Truffle), tests (also using Truffle), dApp scaffolding (using HTML, CSS and JS) and server app scaffolding.
To install, download or clone the repo, then:
npm install
truffle compile
cd ./website npm install
To run truffle tests:
truffle test ./test/flightSurety-airlines.js
truffle test ./test/flightSurety-passengers
truffle test ./test/oracles.js
To use the dapp:
truffle migrate --reset
change addresses on ~/website/src/ethereum/web3.js
cd ./website
npm run start
To view dapp:
http://localhost:8000
Deploy the contents of the ./dapp folder
cd .\server
change address on ~/server/ethereum/web3.js
node --experimental-json-modules --experimental-modules app.js