Add view engine unit - handlebars - and response helpers

This commit is contained in:
garrettmills
2020-08-07 09:51:25 -05:00
parent 3e4f8f00f2
commit b5bde7d077
14 changed files with 165 additions and 2 deletions

View File

@@ -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)
}
}