Skip to content

Commit

Permalink
Merge pull request #23 from dimitrovs/master
Browse files Browse the repository at this point in the history
fix: error on startup
  • Loading branch information
dimitrovs authored Feb 21, 2021
2 parents cddb983 + d31fa5e commit 8bafdbd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
import express = require('express');
import cors = require('cors');
import { sse } from '@toverux/expresse';
const { version } = require('../../package.json');
let version = '';
try {
version = require('../package.json').version; // prod
} catch (e) {
version = require('../../package.json').version; // dev
}

// Controllers (route handlers)
import * as apiController from './controllers/api';
Expand Down

0 comments on commit 8bafdbd

Please sign in to comment.