Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var compileTrust = require('./utils').compileTrust;
var resolve = require('node:path').resolve;
var once = require('once')
var Router = require('router');
const { printExpressLogo } = require('./utils');

/**
* Module variables.
Expand Down Expand Up @@ -602,6 +603,7 @@ app.listen = function listen() {
var done = args[args.length - 1] = once(args[args.length - 1])
server.once('error', done)
}
server.once('listening', printExpressLogo);
return server.listen.apply(server, args)
}

Expand Down
21 changes: 21 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,27 @@ exports.setCharset = function setCharset(type, charset) {
return contentType.format(parsed);
};

/**
* Print ASCII Express logo when server starts
*
* @param {String} type
* @param {String} charset
* @return {String}
* @api private
*/

const EXPRESS_LOGO = `
___ _
│ __│_ ___ __ _ _ ___ ______ (_)___
│ _│╲ ╲ ╱ '_ ╲ '_╱ ─_│_─<_─<_ │ (_─<
│___╱_╲_╲ .__╱_│ ╲___╱__╱__(_)╱ ╱__╱
│_│ │__╱
`;

exports.printExpressLogo = function printExpressLogo() {
console.log(EXPRESS_LOGO);
};

/**
* Create an ETag generator function, generating ETags with
* the given options.
Expand Down