Skip to content

Commit 648d941

Browse files
committed
Added basic readme file
1 parent d26998c commit 648d941

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "handler.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"dev": "serverless offline --location dist"
8+
"dev": "serverless offline --location dist",
9+
"deploy": "serverless deploy"
910
},
1011
"author": "Nicola Peduzzi <[email protected]> (http://nikso.net)",
1112
"license": "MIT",

webpack.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ module.exports = {
1616
},
1717
};
1818

19+
// When webpack 2 will be supported with serverless-webpack, it'll look like:
20+
1921
// module.exports = {
2022
// entry: './src/handler.ts',
2123
// output: {

0 commit comments

Comments
 (0)