turn off logs on production
parent
1fb7da56a8
commit
5c649d8a26
|
@ -8,6 +8,7 @@ import assert from 'assert';
|
|||
const { DEST_SERVER, SERVER_PRETTY_NAME, LISTENING_PORT } = process.env;
|
||||
assert(DEST_SERVER, 'missing DEST_SERVER env variable');
|
||||
assert(SERVER_PRETTY_NAME, 'missing SERVER_PRETTY_NAME env variable');
|
||||
const IS_PRODUCTION = process.env.NODE_ENV === 'production';
|
||||
const FUCKED_UP_SERVERS = ['matrix.org'];
|
||||
const got = Got.extend({
|
||||
headers: {
|
||||
|
@ -15,7 +16,7 @@ const got = Got.extend({
|
|||
},
|
||||
throwHttpErrors: false,
|
||||
hooks: {
|
||||
beforeRequest: [(req) => console.log(`${req.method} ${req.url.href}`)],
|
||||
beforeRequest: IS_PRODUCTION ? [] : [(req) => console.log(`${req.method} ${req.url.href}`)],
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue