Skip to content
This repository was archived by the owner on Jun 24, 2019. It is now read-only.

Commit f610045

Browse files
analistacarloshcrysfel
authored andcommitted
Readme updated and added postman collection (#54)
* README updated * Added postman collection
1 parent 7a190a3 commit f610045

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### Basics requirements
2+
3+
- Docker, yarn
4+
15
# Serverless Azure Functions Node.js Template
26

37
This starter template allows quickly creating a Node.js-based service to Azure Functions. It relies on the `serverless-azure-functions` plugin, and therefore, before you can deploy it, you simply need to run `npm install` in order to acquire it (this dependency is already saved in the `package.json` file).
@@ -15,6 +19,23 @@ The following environment variables must be set, with their respective values:
1519

1620
For details on how to create a service principal and/or acquire your Azure account's subscription/tenant ID, refer to the [Azure credentials](https://serverless.com/framework/docs/providers/azure/guide/credentials/) documentation.
1721

22+
### Install container
23+
24+
`docker-compose up -d`
25+
26+
### Install azure function core tools
27+
28+
`npm install -g azure-functions-core-tools`
29+
30+
### Run localy
31+
32+
`yarn run start`
33+
34+
### Basics end-points (Create and List users)
35+
36+
- Intall Postman: https://www.getpostman.com/
37+
- Import this collection: `coach-code-api.postman_collection.json`
38+
1839
### Deploying the service
1940

2041
Once your Azure credentials are set, you can immediately deploy your service via the following command:
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"variables": [],
3+
"info": {
4+
"name": "coach-code-api",
5+
"_postman_id": "56754707-2116-8c18-e175-b555a3ebf666",
6+
"description": "",
7+
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
8+
},
9+
"item": [
10+
{
11+
"name": "Get Users",
12+
"request": {
13+
"url": "http://localhost:7071/api/get-users",
14+
"method": "GET",
15+
"header": [],
16+
"body": {},
17+
"description": ""
18+
},
19+
"response": []
20+
},
21+
{
22+
"name": "Add User",
23+
"request": {
24+
"url": "http://localhost:7071/api/add-user",
25+
"method": "POST",
26+
"header": [
27+
{
28+
"key": "Content-Type",
29+
"value": "application/json",
30+
"description": ""
31+
}
32+
],
33+
"body": {
34+
"mode": "raw",
35+
"raw": "{\n\t\"userId\": \"35024634845\",\n\t\"name\": \"Carlos\",\n\t\"email\": \"[email protected]\",\n\t\"avatar\": \"avatar\",\n\t\"title\": \"Developer\",\n\t\"description\": \"Developer\",\n\t\"country\": \"Brazil\"\n}"
36+
},
37+
"description": ""
38+
},
39+
"response": []
40+
}
41+
]
42+
}

0 commit comments

Comments
 (0)