aboutsummaryrefslogtreecommitdiffstats
path: root/packages/kovan-faucets/src/ts/server.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-01-09 10:02:41 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-01-09 10:02:41 +0800
commit8019b1b8231cac24dfc6aa3bb2d5115eff11ee89 (patch)
treed270d71404bd3aab44c79dcadf16e348614e9214 /packages/kovan-faucets/src/ts/server.ts
parent8fe81c9d090ce50496f3150602f19433e7aedd1e (diff)
parent7a56e83fa3ca02d796deba3359da480834a9f6ea (diff)
downloaddexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.gz
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.bz2
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.lz
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.xz
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.tar.zst
dexon-sol-tools-8019b1b8231cac24dfc6aa3bb2d5115eff11ee89.zip
Merge branch 'development' into refactor/httpClientJsonParsing
* development: (21 commits) Update connect CHANGELOG Changes to abi-gen after code review Added constructor ABIs to abi-gen Describe #295 in a CHANGELOG Add #302 description to changelog Fix formatting Apply prettier config Install prettier Remove formatting esilnt rules sendTransactionAsync should return txHash string Added Event generation to abi-gen Publish Add dates to CHANGELOG entries Update subproviders CHANGELOG Support both personal_sign and eth_sign Fix Ledger tests given change from `personal_sign` to `eth_sign` Update subprovider to catch correct RPC method Rename guide Update contribution guide Fix broken links in the abi-gen README ...
Diffstat (limited to 'packages/kovan-faucets/src/ts/server.ts')
-rw-r--r--packages/kovan-faucets/src/ts/server.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/kovan-faucets/src/ts/server.ts b/packages/kovan-faucets/src/ts/server.ts
index fbb9caf1e..23642787d 100644
--- a/packages/kovan-faucets/src/ts/server.ts
+++ b/packages/kovan-faucets/src/ts/server.ts
@@ -1,8 +1,8 @@
import * as bodyParser from 'body-parser';
import * as express from 'express';
-import {errorReporter} from './error_reporter';
-import {Handler} from './handler';
+import { errorReporter } from './error_reporter';
+import { Handler } from './handler';
// Setup the errorReporter to catch uncaught exceptions and unhandled rejections
errorReporter.setup();
@@ -10,13 +10,15 @@ errorReporter.setup();
const app = express();
app.use(bodyParser.json()); // for parsing application/json
app.use((req, res, next) => {
- res.header('Access-Control-Allow-Origin', '*');
- res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
- next();
+ res.header('Access-Control-Allow-Origin', '*');
+ res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
+ next();
});
const handler = new Handler();
-app.get('/ping', (req: express.Request, res: express.Response) => { res.status(200).send('pong'); });
+app.get('/ping', (req: express.Request, res: express.Response) => {
+ res.status(200).send('pong');
+});
app.get('/ether/:recipient', handler.dispenseEther.bind(handler));
app.get('/zrx/:recipient', handler.dispenseZRX.bind(handler));