File tree 1 file changed +20
-9
lines changed
1 file changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ module apps.hcm;
2
2
3
3
mixin (ImportPhobos! ());
4
4
5
- // Dub
6
- public import vibe.d;
5
+ // External
6
+ public {
7
+ import vibe.d;
8
+ }
7
9
8
10
// UIM
9
11
public import uim.core;
@@ -26,12 +28,21 @@ public {
26
28
}
27
29
28
30
static this () {
29
- AppRegistry.register(" apps.hcm" ,
30
- App(" hcmApp" , " apps/hcm" )
31
- .importTranslations()
32
- .addRoutes(
33
- Route(" " , HTTPMethod.GET , IndexPageController),
34
- Route(" /" , HTTPMethod.GET , IndexPageController)
35
- )
31
+ // Create app
32
+ auto myApp = App(" hcmApp" , " apps/hcm" );
33
+
34
+ // Customize app
35
+ with (myApp) {
36
+ importTranslations;
37
+ addControllers([
38
+ " hcm.index" : IndexPageController
39
+ ]);
40
+ addRoutes(
41
+ Route(" " , HTTPMethod.GET , controller(" hcm.index" )),
42
+ Route(" /" , HTTPMethod.GET , controller(" hcm.index" ))
36
43
);
44
+ }
45
+
46
+ // register app
47
+ AppRegistry.register(" apps.hcm" , myApp);
37
48
}
You can’t perform that action at this time.
0 commit comments