You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12345678910111213 |
- var fs = require("fs");
-
- module.exports = function(ctx) {
- var readStream = fs.createReadStream("favicon.ico");
- readStream.pipe(ctx.res);
-
- readStream.on("error", function(err) {
- if (err.code === "ENOENT")
- ctx.end(ctx.view("404"));
- else
- ctx.end(err.toString());
- });
- }
|