Skip to content

Commit 2a10d34

Browse files
authored
Merge pull request #47 from ioet/documentation
Docs: README.md
2 parents e7a3346 + 89b88e4 commit 2a10d34

File tree

1 file changed

+44
-5
lines changed

1 file changed

+44
-5
lines changed

README.md

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Considerations
88

9-
The functions run in **Serverless Framework** and use **Windows** like OS.
9+
The functions run in **Serverless Framework** and use **Linux** like OS to run functions.
1010

1111
## Install
1212

@@ -22,24 +22,63 @@ Check Install
2222
serverless -v
2323
```
2424

25-
Install azure plugin
25+
Install azure plugins
2626

2727
```bash
2828
serverless plugin install --name serverless-azure-functions
2929
```
3030

31+
32+
In case that you have **make** installed in your computer you can use
33+
3134
```bash
32-
serverless plugin install --name serverless-azure-functions
35+
make install-serverless-plugins
3336
```
3437

35-
Install Azure CLI
38+
## Azure Account
39+
40+
### Install Azure CLI
3641

3742
[More Information](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
43+
3844
```bash
3945
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
4046
```
4147

42-
Login
48+
### Login
49+
4350
```bash
4451
az login
4552
```
53+
54+
## NodeJs Functions
55+
56+
### Create new function
57+
Go to *nodejs-functions/*, to add a new function, you need create a new directory in *src/handlers/*, inside of directory you need create a **index.js** file
58+
59+
And how last step you need add reference to this function in **serverless.yml**, check the azure serverless documentation [here](https://www.serverless.com/framework/docs/providers/azure/guide/intro/) for more information.
60+
61+
### Add Third Parties Dependencies
62+
Add *package.json* with the modules that you need inside of function directory. Then add the follow line in **Makefile** inside of *nodejs-functions/*:
63+
64+
```bash
65+
install-dependencies-nodejs:
66+
cd src/handlers/automatic-clock-outs ; pwd ; $(MAKE) install
67+
cd src/handlers/my-awesome-function ; pwd ; $(MAKE) install ## add function path. Dont forget use tabs
68+
69+
```
70+
71+
72+
## Python Functions
73+
74+
Go to *python-functions/*, to add a new function, you need create a new directory in *src/handlers/*, inside of directory you need create a _ _ init _ _.py file
75+
76+
And how last step you need add reference to this function in **serverless.yml**, check the azure serverless documentation [here](https://www.serverless.com/framework/docs/providers/azure/guide/intro/) for more information.
77+
78+
79+
## Ops Work
80+
In case that you need:
81+
- Add a new Environment Variable
82+
- Create some function with third parties dependencies
83+
- Error in Pipeline
84+
- Some Question :)

0 commit comments

Comments
 (0)