Skip to content
Open
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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@
</tr>
<tr>
<td>
<a href="#0.5.1">0.5.1</a><br />
<a href="#0.5.0">0.5.0</a><br />
<a href="#0.4.0">0.4.0</a><br />
<a href="#0.3.0">0.3.0</a><br />
</td>
</tr>
</table>

<a id="0.5.1"></a>
## 2018-03-02, Version 0.5.1 (Current), @DuanPengfei

### Notable changes

* **Core**
* Fix can't set template root and engine before `init()`.

### Commits

* [[`146512f75e`]](https://github.com/akyuujs/akyuu/commit/146512f75e308691d3db1475e6a11ef4080bb549) - akyuu: move `init()` to constructor (@XadillaX) [#38](https://github.com/akyuujs/akyuu/pull/38)


<a id="0.5.0"></a>
## 2017-10-23, Version 0.5.0 (Current), @DuanPengfei

Expand Down
5 changes: 4 additions & 1 deletion example/demo/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
*/
"use strict";

const path = require("path");

const akyuu = require("../../../");

akyuu.init(err => {
akyuu.setTemplateRoot(path.resolve(__dirname, "templates"));
akyuu.init(function(err) {
if(err) {
console.error("Failed to start akyuu.js");
console.error(err.stack);
Expand Down
3 changes: 2 additions & 1 deletion lib/akyuu.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ class Akyuu extends Express {
this.controller = new Controller(this);
this.service = new Service(this);
this.boot = new Boot(this);

super.init();
}

init(callback) {
const self = this;
super.init();

// load logger
this.logger.load();
Expand Down