25 lines
641 B
JavaScript
Raw Normal View History

2022-05-16 14:59:55 -04:00
const MoreCode = require("./MoreCode");
2022-05-16 17:45:09 +01:00
2022-05-16 14:59:55 -04:00
class Mod
2022-05-16 17:45:09 +01:00
{
// not used for this example
2022-05-16 14:59:55 -04:00
load(container)
2022-05-16 17:45:09 +01:00
{ return }
2022-05-16 14:59:55 -04:00
delayedLoad(container)
{
2022-05-16 17:45:09 +01:00
// get logger
2022-05-16 14:59:55 -04:00
const logger = container.resolve("WinstonLogger");
2022-05-16 17:45:09 +01:00
// Make a new instance of the 'MoreCode' class
const moreCode = new MoreCode();
// call the function 'getTheWordFlub()' and assign the result to 'result'
const result = moreCode.getTheWordFlub();
// log the 'myProperty' property to the console
logger.info(`Here is the value from my second class: ${result}`);
}
}
module.exports = { mod: new Mod() }