File tree 3 files changed +26
-1
lines changed
3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change
1
+ This is exaple of serverless lambda function that is written with typescript and supports offline, local development.
2
+
3
+ ### Install
4
+
5
+ To install it (assuming you have serverless configured with AWS):
6
+
7
+ ` yarn install `
8
+
9
+ ### For local development:
10
+
11
+ ` yarn run dev `
12
+
13
+ Your lambda should be avaliable on ` http://localhost:3000 ` - and example function: ` http://localhost:3000/hello `
14
+
15
+ ### For deployment:
16
+
17
+ ` yarn run deploy `
18
+
19
+
20
+ TODO (PR's are welcome!):
21
+ - Make it testable and add test example
22
+ - When webpack 2 support will be added to ` serverless-webpack ` - modify config file
Original file line number Diff line number Diff line change 5
5
"main" : " handler.js" ,
6
6
"scripts" : {
7
7
"test" : " echo \" Error: no test specified\" && exit 1" ,
8
- "dev" : " serverless offline --location dist"
8
+ "dev" : " serverless offline --location dist" ,
9
+ "deploy" : " serverless deploy"
9
10
},
10
11
"author" :
" Nicola Peduzzi <[email protected] > (http://nikso.net)" ,
11
12
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ module.exports = {
16
16
} ,
17
17
} ;
18
18
19
+ // When webpack 2 will be supported with serverless-webpack, it'll look like:
20
+
19
21
// module.exports = {
20
22
// entry: './src/handler.ts',
21
23
// output: {
You can’t perform that action at this time.
0 commit comments