minimonolith 0.1.1 → 0.1.2
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.
- package/index.js +2 -1
- package/package.json +1 -1
- package/src/todo/delete/handler.js +10 -0
- package/src/todo/delete/valid.js +8 -0
- package/src/todo/get/handler.js +7 -0
- package/src/todo/get/valid.js +6 -0
- package/src/todo/index.js +5 -0
- package/src/todo/model.js +8 -0
- package/src/todo/post/handler.js +9 -0
- package/src/todo/post/valid.js +8 -0
- package/src/index.js +0 -25
package/index.js
CHANGED
package/package.json
CHANGED
package/src/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import createAPI from 'lambda-api';
|
|
4
|
-
import healthCheck from './healthCheck/index.js';
|
|
5
|
-
import { serviceHandler } from './serviceHandler/index.js';
|
|
6
|
-
|
|
7
|
-
const API = createAPI();
|
|
8
|
-
|
|
9
|
-
// Health Check
|
|
10
|
-
API.get('/', async (req, res) => {
|
|
11
|
-
console.log('HEALTH_CHECK ENTERING');
|
|
12
|
-
const response = healthCheck();
|
|
13
|
-
console.log('HEALTH_CHECK SUCCESS');
|
|
14
|
-
return { response };
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
serviceHandler(API, 'todo', 'src');
|
|
18
|
-
|
|
19
|
-
export const handler = async (e, context) => {
|
|
20
|
-
console.log({
|
|
21
|
-
EVENT_PATH: e.path,
|
|
22
|
-
EVENT_METHOD: e.httpMethod,
|
|
23
|
-
});
|
|
24
|
-
return await API.run(e, context);
|
|
25
|
-
};
|