Add view engine unit - handlebars - and response helpers
This commit is contained in:
@@ -5,8 +5,9 @@ import {container, make} from '../../../di/src/global.ts'
|
||||
import {DependencyKey} from '../../../di/src/type/DependencyKey.ts'
|
||||
import RunLevelErrorHandler from '../error/RunLevelErrorHandler.ts'
|
||||
import {Status} from '../const/status.ts'
|
||||
import Instantiable from "../../../di/src/type/Instantiable.ts";
|
||||
import {Collection} from "../collection/Collection.ts";
|
||||
import Instantiable from '../../../di/src/type/Instantiable.ts'
|
||||
import {Collection} from '../collection/Collection.ts'
|
||||
import {path} from '../external/std.ts'
|
||||
|
||||
@Service()
|
||||
export default class Application {
|
||||
@@ -66,4 +67,20 @@ export default class Application {
|
||||
this.logger.verbose(e)
|
||||
}
|
||||
}
|
||||
|
||||
get root() {
|
||||
return path.resolve('.')
|
||||
}
|
||||
|
||||
get app_root() {
|
||||
return path.resolve('./app')
|
||||
}
|
||||
|
||||
path(...parts: string[]) {
|
||||
return path.resolve(this.root, ...parts)
|
||||
}
|
||||
|
||||
app_path(...parts: string[]) {
|
||||
return path.resolve(this.app_root, ...parts)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user