Skip to content
Myr

docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent 73092c9 · Browse files · 2 files+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−4 removed

  • other:+4 added−4 removed

2 files+4 added−4 removed

modified:lib/application.js+3 added-3 removed
161 unmodified lines
162 *163 * For engines that do not provide `.__express` out of the box,164 * or if you wish to "map" a different extension to the template engine165 * you may use this method. For example mapping the EJS template engine to166 * ".html" files166 * ".html" files:167 *168 * app.engine('html', require('ejs').renderFile);169 *170 * In this case EJS provides a `.renderFile()` method with
209 unmodified lines
380 *381 * Note:382 *383 * These callbacks are invoked immediately, and384 * are effectively sugar for the following.384 * are effectively sugar for the following:385 *386 * var env = process.env.NODE_ENV || 'development';387 *388 * switch (env) {
135 unmodified lines
524 * A node `http.Server` is returned, with this525 * application (which is a `Function`) as its526 * callback. If you wish to create both an HTTP527 * and HTTPS server you may do so with the "http"528 * and "https" modules as shown here.528 * and "https" modules as shown here:529 *530 * var http = require('http')531 * , https = require('https')532 * , express = require('express')
13 unmodified lines
modified:lib/request.js+1 added-1 removed
265 unmodified lines
266 * req.is('html');267 * // => false268 * 269 * Now within our route callbacks, we can use to to assert content types270 * such as "image/jpeg", "image/png", etc.270 * such as "image/jpeg", "image/png" as shown here:271 * 272 * app.post('/image/upload', function(req, res, next){273 * if (req.is('image/*')) {274 * // do something
143 unmodified lines