diff --git a/examples/NodeInterprocess/index.js b/examples/NodeInterprocess/index.js index 9570a3eb..ec1e1454 100644 --- a/examples/NodeInterprocess/index.js +++ b/examples/NodeInterprocess/index.js @@ -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!'); }); diff --git a/examples/NodeInterprocess/listener.js b/examples/NodeInterprocess/listener.js index e901df94..dea6e764 100644 --- a/examples/NodeInterprocess/listener.js +++ b/examples/NodeInterprocess/listener.js @@ -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); }) });