Make eslint happy
This commit is contained in:
parent
bb837b4580
commit
14a62e5f76
|
@ -1,6 +1,25 @@
|
|||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2016 Realm Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
'use strict';
|
||||
|
||||
var express = require('express'),
|
||||
util = require('util'),
|
||||
winston = require('winston');
|
||||
winston = require('winston'),
|
||||
RealmWinston = require('./winston-realm').Realm;
|
||||
|
||||
var app = express();
|
||||
|
@ -14,12 +33,13 @@ app.get('/', function (req, res) {
|
|||
winston.info('Handled Hello World');
|
||||
});
|
||||
|
||||
app.use(function (req, res, next) {
|
||||
app.use(function (req, res) {
|
||||
res.status(404).send('Sorry can not find that!');
|
||||
winston.error('404 Error at: ' + req.url);
|
||||
})
|
||||
|
||||
app.listen(3000, function () {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Example app listening on port 3000!');
|
||||
});
|
||||
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2016 Realm Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
'use strict';
|
||||
|
||||
var Realm = require('realm');
|
||||
|
@ -10,6 +28,8 @@ let winstonRealm = new Realm({
|
|||
winstonRealm.objects('Log').filtered('level = "error"').addListener((logs, changes) => {
|
||||
changes.insertions.map((index) => {
|
||||
let log = logs[index];
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(log.message);
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue