Skip to content

Commit 4ee57fd

Browse files
committed
Integrate README updates
1 parent ca74ee7 commit 4ee57fd

File tree

6 files changed

+37
-4
lines changed

6 files changed

+37
-4
lines changed

docs/development.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Development
2+
3+
To run Serverless Framework with a local checkout of this plugin, you can modify the `serverless.yml` for one or more functions as follows:
4+
5+
```yaml
6+
...
7+
8+
# Change this
9+
plugins:
10+
- serverless-scaleway-functions
11+
12+
# To this
13+
plugins:
14+
- <path to checkout of this project>
15+
```
16+
17+
Then you can run commands as normal.

docs/es-modules.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Path to your handler file (from `serverless.yml`), omit `./`, `../`, and add the
99
- secondHandler.js => module.exports.mySecondHandler = ...
1010
- serverless.yml
1111
```
12+
1213
In serverless.yml:
14+
1315
```yml
1416
provider:
1517
# ...
@@ -42,12 +44,12 @@ According to the official documentation, to use ES modules you can specify the m
4244
This then enables you to write your code for ES modules:
4345

4446
```javascript
45-
export {handle};
47+
export { handle };
4648
4749
function handle (event, context, cb) {
4850
return {
4951
body: process.version,
50-
headers: {"Content-Type": ["text/plain"]},
52+
headers: { "Content-Type": ["text/plain"] },
5153
statusCode: 200,
5254
};
5355
};
@@ -56,6 +58,7 @@ function handle (event, context, cb) {
5658
The use of ES modules is encouraged since they are more efficient and make setup and debugging much easier.
5759

5860
Note that using `"type": "module"` or `"type": "commonjs"` in your `package.json` file will enable or disable some features in Node runtime, such as:
61+
5962
- `commonjs` is used as the default value
6063
- `commonjs` allows you to use `require/module.exports` (synchronous code loading - it basically copies all file contents)
6164
- `module` allows you to use `import/export` ES6 instructions (asynchronous loading - more optimized as it imports only the pieces of code you need)

docs/events.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ functions:
1919
# "events" is a list of triggers, the first key being the type of trigger.
2020
- schedule:
2121
# CRON Job Schedule (UNIX Format)
22-
rate: '1 * * * *'
22+
rate: "1 * * * *"
23+
2324
# Input variable are passed in your function's event during execution
2425
input:
2526
key: value
@@ -33,10 +34,11 @@ custom:
3334
containers:
3435
mycontainer:
3536
directory: my-directory
37+
3638
# Events key
3739
events:
3840
- schedule:
39-
rate: '1 * * * *'
41+
rate: "1 * * * *"
4042
input:
4143
key: value
4244
key2: value2

docs/golang.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Golang
22

33
Path to your handler's **package**. For example, if you have the following structure:
4+
45
```yml
56
- src
67
- testing
@@ -10,7 +11,9 @@ Path to your handler's **package**. For example, if you have the following struc
1011
- serverless.yml
1112
- handler.go -> package main at the root of project
1213
```
14+
1315
Your serverless.yml `functions` should look something like this:
16+
1417
```yml
1518
provider:
1619
# ...

docs/python.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Path to handler file `src/testing/handler.py`:
99
- secondHandler.py => def my_second_handler
1010
- serverless.yml
1111
```
12+
1213
In serverless.yml:
14+
1315
```yml
1416
provider:
1517
# ...

docs/troubleshooting.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Troubleshooting
2+
3+
### Rate Limiting Issue
4+
5+
If you are experiencing rate limiting issues (error 429) in your application, consider engaging with the support and/or the community. When seeking assistance, remember to provide relevant details, such as the specific rate limiting error messages, the affected components, and any relevant configuration information. This will enable us to better understand your situation and provide appropriate guidance or solutions.
6+

0 commit comments

Comments
 (0)