diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-01-03 18:39:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-03 18:39:08 +0800 |
commit | d5e0da0eb64ab25cb8e03a61040702cf8e02391a (patch) | |
tree | a7fde03873f3c1b8689d3991edbb362f8022e5f0 /packages/kovan-faucets/src/ts/server.ts | |
parent | f684cc371104b594358fb8cd274e453c81f48881 (diff) | |
parent | e744e4cd989bd3ae1070c59f7baa8097f18b8b06 (diff) | |
download | dexon-sol-tools-d5e0da0eb64ab25cb8e03a61040702cf8e02391a.tar dexon-sol-tools-d5e0da0eb64ab25cb8e03a61040702cf8e02391a.tar.gz dexon-sol-tools-d5e0da0eb64ab25cb8e03a61040702cf8e02391a.tar.bz2 dexon-sol-tools-d5e0da0eb64ab25cb8e03a61040702cf8e02391a.tar.lz dexon-sol-tools-d5e0da0eb64ab25cb8e03a61040702cf8e02391a.tar.xz dexon-sol-tools-d5e0da0eb64ab25cb8e03a61040702cf8e02391a.tar.zst dexon-sol-tools-d5e0da0eb64ab25cb8e03a61040702cf8e02391a.zip |
Merge pull request #291 from 0xProject/feature/prettier
Use prettier
Diffstat (limited to 'packages/kovan-faucets/src/ts/server.ts')
-rw-r--r-- | packages/kovan-faucets/src/ts/server.ts | 14 |
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)); |