|
|
|
|
|
|
|
|
|
|
|
|
|
|
Install: |
|
|
Install: |
|
|
|
|
|
|
|
|
npm install --save webframe |
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
npm install --save webframe |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
Use: |
|
|
Use: |
|
|
|
|
|
|
|
|
var webframe = require("webframe"); |
|
|
|
|
|
var app = new webframe.App(); |
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
var webframe = require("webframe"); |
|
|
|
|
|
var app = new webframe.App(); |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
The file example.js contains an example of a small web application. |
|
|
The file example.js contains an example of a small web application. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* `res403`: The string to return for a 403 error. "{{pathname}}" will be |
|
|
* `res403`: The string to return for a 403 error. "{{pathname}}" will be |
|
|
replaced with the pathname. |
|
|
replaced with the pathname. |
|
|
|
|
|
|
|
|
var app = webframe.App({ client_utils: true }); |
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
var app = new webframe.App({ client_utils: true }); |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
### app.route(method, path [, middleware], func) |
|
|
### app.route(method, path [, middleware], func) |
|
|
|
|
|
|