added sentry
This commit is contained in:
parent
6d8330992d
commit
50714d35a5
12 changed files with 1065 additions and 961 deletions
|
@ -16,13 +16,10 @@ const log = mozlog('portal.server');
|
|||
|
||||
const app = express();
|
||||
|
||||
app.engine(
|
||||
'handlebars',
|
||||
exphbs({
|
||||
defaultLayout: 'main',
|
||||
partialsDir: 'views/partials/'
|
||||
})
|
||||
);
|
||||
app.engine('handlebars', exphbs({
|
||||
defaultLayout: 'main',
|
||||
partialsDir: 'views/partials/'
|
||||
}));
|
||||
app.set('view engine', 'handlebars');
|
||||
|
||||
app.use(helmet());
|
||||
|
@ -30,10 +27,12 @@ app.use(busboy());
|
|||
app.use(bodyParser.json());
|
||||
app.use(express.static(path.join(__dirname, '../public')));
|
||||
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.render('index', {
|
||||
shouldRenderAnalytics: notLocalHost,
|
||||
trackerId: conf.analytics_id
|
||||
trackerId: conf.analytics_id,
|
||||
dsn: conf.sentry_id
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -54,7 +53,8 @@ app.get('/download/:id', (req, res) => {
|
|||
filename: filename,
|
||||
filesize: bytes(contentLength),
|
||||
shouldRenderAnalytics: notLocalHost,
|
||||
trackerId: conf.analytics_id
|
||||
trackerId: conf.analytics_id,
|
||||
dsn: conf.sentry_id
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue