loopback/server/middleware/favicon.js

18 lines
480 B
JavaScript
Raw Normal View History

2016-05-03 22:50:21 +00:00
// Copyright IBM Corp. 2014. All Rights Reserved.
// Node module: loopback
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
'use strict';
var favicon = require('serve-favicon');
var path = require('path');
2014-11-24 23:08:21 +00:00
/**
* Serve the LoopBack favicon.
* @header loopback.favicon()
*/
module.exports = function(icon, options) {
icon = icon || path.join(__dirname, '../../favicon.ico');
return favicon(icon, options);
};