support route handler arguments; add daton::static file server
This commit is contained in:
2
app/assets/.gitignore
vendored
Normal file
2
app/assets/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
@@ -9,3 +9,4 @@ export { default as HttpServerUnit } from '../../lib/src/unit/HttpServer.ts'
|
||||
export { default as RoutingUnit } from '../../lib/src/unit/Routing.ts'
|
||||
export { default as ServicesUnit } from '../../lib/src/unit/Services.ts'
|
||||
export { default as ViewEngineUnit } from '../../lib/src/unit/ViewEngine.ts'
|
||||
export { default as DatonMiddlewareUnit } from '../../lib/src/unit/DatonMiddleware.ts'
|
||||
|
||||
@@ -14,5 +14,5 @@ export default {
|
||||
session: {
|
||||
driver: 'database', // memory | database
|
||||
model: 'http:Session', // required for database
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@ export default {
|
||||
get: {
|
||||
'/': 'controller::Home.get_home',
|
||||
'/maybe': ['middleware::Test', 'controller::Home.get_home'],
|
||||
'/statics/**': { handler: 'daton::static', arg: 'assets' },
|
||||
},
|
||||
} as RouterDefinition
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
RoutingUnit,
|
||||
ServicesUnit,
|
||||
ViewEngineUnit,
|
||||
DatonMiddlewareUnit,
|
||||
} from './bundle/daton_units.ts'
|
||||
|
||||
export default [
|
||||
@@ -19,6 +20,7 @@ export default [
|
||||
ModelsUnit,
|
||||
ViewEngineUnit,
|
||||
HttpKernelUnit,
|
||||
DatonMiddlewareUnit,
|
||||
MiddlewareUnit,
|
||||
ControllerUnit,
|
||||
RoutesUnit,
|
||||
|
||||
Reference in New Issue
Block a user