Skip to content

Commit 09dff06

Browse files
committed
Improving starging template
1 parent 68e3273 commit 09dff06

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To install middleware, run npm command in `sourcejs/user` folder:
1212
npm install sourcejs-tpl-plugin --save
1313
```
1414

15-
After restarting your app, plugin will be loaded automatically. To disable it, remove npm module and restart the app.
15+
After restarting your app, middleware will be loaded automatically. To disable it, remove npm module and restart the app.
1616

1717
## More examples
1818

core/middleware/index.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
// NodeJS module. Included automatically from app.js.
1+
// NodeJS module, included automatically from app.js
22
// ExpressJS middleware http://expressjs.com
3-
//
43

5-
// Examples:
6-
// var someModule = require('some-module');
7-
// exports.process = function (req, res, next) {
8-
// processRequest(req, res);
9-
// next();
10-
// };
4+
var processRequest = function (req, res) {
5+
// Process res data
6+
};
7+
8+
exports.process = function (req, res, next) {
9+
processRequest(req, res);
10+
11+
next();
12+
};

0 commit comments

Comments
 (0)