1
extend layout
block content
script.
var monitor = require("os-monitor");
monitor.start();
monitor.start({
delay: 3000
, freeman: 1000000000
, uptime: 1000000
, critical1: 0.7
, critical5: 0.7
, critical15: 0.7
, silent: false
, stream: false
, immediate: false
});
monitor.on('monitor',function(event) {
console.log(event.type, 'This event always happens on each monitor cycle!');
});
monitor.on('loadavg1',function(event) {
console.log(event.type, 'Load average is exceptionally high!');
});
monitor.on('freemem',function(event) {
console.log(event.type, 'Free memory is very low!');
});
monitor.throttle('loadavg5',function(event) {
},monitor,minutes(5));
monitor.config({
freemem: 0.3
});
monitor.stop();
monitor.isRunning();
monitor.start({stream:true}).pipe(process.stdout);
block side bar
.widget
h1 Widget
p
| Sed ccccc rhoncus ut
| eleifvvvv in nulla enim.
p
| Vivambbbbbbbbbbbbt molestie
| vebula.
var express = require('express');
var stylus = require('stylus');
var nib = require('nib');
var app = express();
function compile(str, path) {
return stylus(str)
\t .set('filename', path)
\t .use(nib())
}
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.logger('dev'));
app.use(stylus.middleware({
src: __dirname + '/public',
compile: compile
}));
app.use(express.static(__dirname + '/public'));
app.get('/', function(req, res) {
res.render('index', {
\t title: 'Home'
})
});
app.listen(3000, function() {
console.log('Server start http://localhost:3000');
});
我的天啊。你救我。謝謝!我會嘗試 :) – Jemkim