You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+60-60Lines changed: 60 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,67 +164,67 @@ Available runtimes are:
164
164
#### Functions Handler
165
165
166
166
Based on the chosen runtime, the `handler` variable on function might vary:
167
-
- `node` (8 or 10): Path to your handler file (from serverless.yml), omit `./`, `../`.
168
-
```
169
-
- src
170
-
- handlers
171
-
- firstHandler.js
172
-
- secondHandler.js
173
-
- serverless.yml
174
-
```
175
-
Inside serverless.yml:
176
-
```yml
177
-
provider:
178
-
# ...
179
-
runtime: node8 # or node10
180
-
functions:
181
-
first:
182
-
handler: src/handlers/firstHandler.js
183
-
second:
184
-
handler: src/handlers/secondHandler.js
185
-
```
186
-
-`python` (2.7 and 3.7): Similar to `node`, path to handler file`src/testing/handler.py`:
187
-
```
188
-
- src
189
-
- handlers
190
-
- firstHandler.py
191
-
- secondHandler.py
192
-
- serverless.yml
193
-
```
194
-
Inside serverless.yml:
195
-
```yml
196
-
provider:
197
-
# ...
198
-
runtime: python3 # or python for python 2.7
199
-
functions:
200
-
first:
201
-
handler: src/handlers/firstHandler.py
202
-
second:
203
-
handler: src/handlers/secondHandler.py
204
-
```
167
+
- `node` (8 or 10): Path to your handler file (from serverless.yml), omit `./`, `../`, suffixed by the exported function to use (example: `myFunction.handle` => file `myFunction.js` exports a function `handle`).
-`python` (2.7 and 3.7): Similar to `node`, path to handler file, suffixed with exported function to use: `src/testing/handler.handle` => file `handler.py` defines a method `handle`, inside directory `src/testing`.
0 commit comments