Exports and cleanup for external use

This commit is contained in:
Garrett Mills 2020-09-05 09:28:24 -05:00
parent 601649e699
commit 41b25a5670
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246
5 changed files with 9 additions and 2 deletions

View File

@ -123,7 +123,7 @@ export default class Application {
* @type string
*/
get app_root() {
return this.injector.make(Scaffolding).base_dir
return path.resolve(this.injector.make(Scaffolding).base_dir, 'app')
}
/**

2
lib/src/mod.ts Normal file
View File

@ -0,0 +1,2 @@
export {env} from "./unit/Scaffolding.ts";
export {ViewEngine} from "./const/view_engines.ts";

View File

@ -7,3 +7,4 @@ export { Request } from './http/Request.ts'
export * from './http/response/helpers.ts'
export { default as Middleware } from './http/Middleware.ts'
export { RouterDefinition } from './http/type/RouterDefinition.ts'
export * from "./const/http.ts";

View File

@ -39,7 +39,7 @@ export default class Scaffolding extends LifecycleUnit {
base_script: string
) {
super()
this.base_dir = path.dirname(base_script).replace('file:///', '/')
this.base_dir = path.dirname(base_script)//.replace('file:///', '/')
}
/**

4
orm/src/module.ts Normal file
View File

@ -0,0 +1,4 @@
export { Field } from "./model/Field.ts";
export { Type } from "./db/types.ts";
export { Model } from "./model/Model.ts";
export { Relation } from "./model/relation/decorators.ts";