Skip to content

Commit

Permalink
jesus christ
Browse files Browse the repository at this point in the history
  • Loading branch information
kashalls committed Nov 9, 2023
1 parent c0694d2 commit 262f095
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ const logger = Logger.get('server');

const server = fastify(genFastifyOpts());

// Normally I would never condone this, but I lack the patience to deal with this correctly.
// This is just to get JSON.stringify to globally serialize BigInt's
BigInt.prototype['toJSON'] = function () {
return this.toString();
};

if (dev) {
server.addHook('onRoute', (opts) => {
logger.child('route').debug(JSON.stringify(opts));
Expand Down

0 comments on commit 262f095

Please sign in to comment.