Skip to content

Can't set template root and engine before init() #37

@XadillaX

Description

@XadillaX
  • Version: 0.5.0
  • Node.js Version: 6.9.1
  • Platform: Darwin zanarpro 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu-4570.1.46~2/RELEASE_X86_64 x86_64 i386 MacBookPro11,3 Darwin
  • Subsystem: akyuu
const akyuu = require("akyuu");

akyuu.setTemplateRoot(path.resolve(__dirname, 'templates'));
akyuu.init(function(err) {
});

It will show:

  this.settings[setting] = val;
                         ^

TypeError: Cannot set property 'views' of undefined
    at Akyuu.set (/Users/.../express/4.15.2/express/lib/application.js:361:26)
    at Akyuu.setTemplateRoot (/Users/.../akyuu/lib/akyuu.js:172:14)
    ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions