kaelum 1.8.4 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import kaelum from "kaelum";
|
|
2
|
+
import { routes } from "./routes";
|
|
2
3
|
|
|
3
4
|
const app = kaelum();
|
|
4
5
|
|
|
@@ -11,7 +12,6 @@ app.setConfig({
|
|
|
11
12
|
});
|
|
12
13
|
|
|
13
14
|
// Mount routes
|
|
14
|
-
const { routes } = require("./routes");
|
|
15
15
|
routes(app);
|
|
16
16
|
|
|
17
17
|
// Health check endpoint
|
|
@@ -28,5 +28,3 @@ app.useErrorHandler({ exposeStack: false });
|
|
|
28
28
|
// Start server
|
|
29
29
|
const PORT = process.env.PORT || 4000;
|
|
30
30
|
app.start(PORT);
|
|
31
|
-
|
|
32
|
-
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const { version } = require("../../package.json");
|
|
1
|
+
import * as users from "./controllers/usersController";
|
|
2
|
+
import { authMock } from "./middlewares/authMock";
|
|
4
3
|
|
|
5
4
|
const routes = (app: any): void => {
|
|
6
5
|
// Global middleware for /users path
|
|
@@ -29,7 +28,7 @@ const routes = (app: any): void => {
|
|
|
29
28
|
// Metadata endpoint
|
|
30
29
|
app.addRoute("/meta", {
|
|
31
30
|
get: (req: any, res: any) =>
|
|
32
|
-
res.json({
|
|
31
|
+
res.json({ framework: "Kaelum" }),
|
|
33
32
|
});
|
|
34
33
|
};
|
|
35
34
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import kaelum from "kaelum";
|
|
2
|
+
import { routes } from "./routes";
|
|
2
3
|
|
|
3
4
|
const app = kaelum();
|
|
4
5
|
|
|
@@ -11,7 +12,6 @@ app.setConfig({
|
|
|
11
12
|
});
|
|
12
13
|
|
|
13
14
|
// Register routes
|
|
14
|
-
const { routes } = require("./routes");
|
|
15
15
|
routes(app);
|
|
16
16
|
|
|
17
17
|
// Health check endpoint
|
|
@@ -28,5 +28,3 @@ app.useErrorHandler({ exposeStack: false });
|
|
|
28
28
|
// Start server
|
|
29
29
|
const PORT = process.env.PORT || 3000;
|
|
30
30
|
app.start(PORT);
|
|
31
|
-
|
|
32
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as pages from "./controllers/pagesController";
|
|
2
|
+
import { logger } from "./middlewares/logger";
|
|
3
3
|
|
|
4
4
|
// Mock auth middleware
|
|
5
5
|
const auth = (req: any, res: any, next: any): void => {
|