Skip to content

Commit 0dad999

Browse files
committed
added: context
1 parent fddcf34 commit 0dad999

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

generators/controllers/default.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ function view_homepage() {
2020
// utils.async(fn)([callback]);
2121

2222
// Prepare function to async
23-
// sync(fn)
24-
// utils.sync(fn);
23+
// sync(fn, [owner/context])
24+
// utils.sync(fn, [owner/context]);
2525

2626
async(function *() {
2727

2828
var a = yield sync(fs.readFile)(self.path.root('index.js'));
2929
var b = yield sync(fs.readFile)(self.path.root('controllers/default.js'));
3030

31+
// Example MySQL connection:
32+
// var c = yield sync(connection.query, connection)('SELECT * FROM USER LIMIT 0, 10');
33+
3134
// custom function
3235
var c = yield sync(custom)(1, 2);
3336

0 commit comments

Comments
 (0)