基本靜態檔案和 favicon 服務示例

var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');

var app = express();

app.use(favicon(__dirname + '/public/img/favicon.ico'));
app.use(express.static(path.join(__dirname, 'public')));

app.listen(3000, function() {
  console.log("Express App listening on port 3000");
})