A testnet faucet for the eCash network.
This is based on the work from Chris Troutner.
Provide several DoS mitigation features:
- IP request rate limiting
- Give-out rate limiting
- Address reuse prevention
- node ^10.15.1
- npm ^6.7.0
git clone https://github.com/Fabcien/testnet-faucet2.git faucet
cd faucet
npm installCreate a wallet.json file at the root of the project, with a content similar to:
{
"mnemonic": "Your faucet wallet mnemonic",
"cashAddress": "bchtest:qzcpnsw4nfgzn0k5lnf59pphws0egs74fc7k7lzaa4",
"legacyAddress": "mwa65TNGEVCPfHt55aQqcwEjcWgfokuttN"
}Then:
docker-compose up -d koa-mongodb
BCHJSTOKEN=<your fullstack.cash API token> \
npm start
Then navigate to front-end/index.html.
├── bin
│ └── server.js # Bootstrapping and entry point
├── config # Server configuration settings
│ ├── env # Environment specific config
│ │ ├── common.js
│ │ ├── development.js
│ │ ├── production.js
│ │ └── test.js
│ ├── index.js # Config entrypoint - exports config according to envionrment and commons
│ └── passport.js # Passportjs config of strategies
|
├── production # Dockerfile for build production container
|
├── src # Source code
│ ├── lib # Business logic libraries
│ ├── modules
│ │ ├── controller.js # Module-specific controllers
│ │ └── router.js # Router definitions for module
│ ├── models # Mongoose models
│ └── middleware # Custom middleware
│ └── validators # Validation middleware
└── test # Unit tests
npm startStart server on live modenpm run devStart server on dev mode with nodemonnpm run docsGenerate API documentationnpm testRun mocha testsdocker-compose buildBuild a 'production' Docker containerdocker-compose upRun the docker container
API documentation is written inline and generated by apidoc.
Call npm run docs to generate, then visit docs/index.html to view the docs.
- koa2
- koa-router
- koa-bodyparser
- koa-generic-session
- koa-logger
- MongoDB
- Mongoose
- Passport
- Nodemon
- Mocha
- apidoc
- ESLint
v2.3.0 uploaded to IPFS:
- Get it:
ipfs get QmUz4b2KwNLNvHZRTYcgrPCuKAhMB73XWN8vY8LLVVEYV1 - Pin it:
ipfs pin add -r QmUz4b2KwNLNvHZRTYcgrPCuKAhMB73XWN8vY8LLVVEYV1
MIT