Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/node-red/node_modules/tiny-lr/examples/express/ drwxr-xr-x | |
| Viewing file: Select action/file-type: const path = require('path');
const express = require('express');
const tinylr = require('../..');
const debug = require('debug')('tinylr:server');
const gaze = require('gaze');
process.env.DEBUG = process.env.DEBUG || 'tinylr*';
var app = module.exports = express();
function logger (fmt) {
fmt = fmt || '%s - %s';
return function logger (req, res, next) {
debug(fmt, req.method, req.url);
next();
};
}
(function watch (em) {
em = em || new (require('events').EventEmitter)();
gaze(path.join(__dirname, 'styles/site.css'), function () {
this.on('changed', function (filepath) {
tinylr.changed(filepath);
});
});
return watch;
})();
app
.use(logger())
.use('/', express.static(path.join(__dirname)))
.use(tinylr.middleware({ app: app }));
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0108 ]-- |