aboutsummaryrefslogtreecommitdiffstats
path: root/packages/testnet-faucets/src/ts/server.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-16 20:59:10 +0800
committerFabio Berger <me@fabioberger.com>2018-05-16 20:59:10 +0800
commit839db68571037f6fff8273aaade6ea0bd14ea8a5 (patch)
tree302b3164f01bc5363bf07841a42fa30b3842169e /packages/testnet-faucets/src/ts/server.ts
parentfec6ac3ff0c4781cea0b3f42e287aee2b8aa2a79 (diff)
downloaddexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.gz
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.bz2
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.lz
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.xz
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.zst
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.zip
Fix TSLint rules
Diffstat (limited to 'packages/testnet-faucets/src/ts/server.ts')
-rw-r--r--packages/testnet-faucets/src/ts/server.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/testnet-faucets/src/ts/server.ts b/packages/testnet-faucets/src/ts/server.ts
index 198a5fdc9..55c1d55d8 100644
--- a/packages/testnet-faucets/src/ts/server.ts
+++ b/packages/testnet-faucets/src/ts/server.ts
@@ -1,6 +1,7 @@
import * as bodyParser from 'body-parser';
import * as express from 'express';
+import { constants } from './constants';
import { errorReporter } from './error_reporter';
import { Handler } from './handler';
import { parameterTransformer } from './parameter_transformer';
@@ -18,7 +19,7 @@ app.use((req, res, next) => {
const handler = new Handler();
app.get('/ping', (req: express.Request, res: express.Response) => {
- res.status(200).send('pong');
+ res.status(constants.SUCCESS_STATUS).send('pong');
});
app.get('/info', handler.getQueueInfo.bind(handler));
app.get('/ether/:recipient', parameterTransformer.transform, handler.dispenseEther.bind(handler));
@@ -28,5 +29,6 @@ app.get('/order/zrx/:recipient', parameterTransformer.transform, handler.dispens
// Log to rollbar any errors unhandled by handlers
app.use(errorReporter.errorHandler());
-const port = process.env.PORT || 3000;
+const DEFAULT_PORT = 3000;
+const port = process.env.PORT || DEFAULT_PORT;
app.listen(port);