FlightSurety is a sample application project for Udacity's Blockchain course.
- Node ^v16
- [optional] Docker (if you want to speed up contract compilation)
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 run:
npm install
You can either run:
npm run ganache
or run a different ethereum blockchain at port 7545
with mnemonic:
candy maple cake sugar pudding cream honey rich smooth crumble sweet treat
The provided tests test all functionality, including oracles:
npm run test
In order to work, the DApp and server need deployed contracts.
npm run migrate
or npm run migrate:docker
if you have Docker installed on your system.
NOTE: With Ganache-CLI, the first deployment tends to fail, so just deploy the contracts one more time.
To use and further develop the server (nodemon, watches for file changes and reloads):
npm run server
To use and further develop the dapp (hot reload with webpack dev server):
npm run dapp
To view dapp:
http://localhost:8000