Closed6

Azure Functions環境構築 ~TypeScript編~

Yusuke SatakeYusuke Satake
func init . --model V4

上記を実行すると以下の表示が。

azure-functions3 git:(main) func init . --model V4
Select a number for worker runtime:
1. dotnet
2. dotnet (isolated process)
3. node
4. python
5. powershell
6. custom
Choose option: 3
node
Select a number for language:
1. javascript
2. typescript
Choose option: 2
typescript
Writing .funcignore
Writing package.json
Writing tsconfig.json
Writing .gitignore
Writing host.json
Writing local.settings.json
Writing /Users/s.y/dev/10.azure/azure-functions3/SampleFunction/.vscode/extensions.json
Yusuke SatakeYusuke Satake

以下コマンドを実行

func new
azure-functions3 git:(main) func new
Select a number for template:
1. Azure Blob Storage trigger
2. Azure Cosmos DB trigger
3. Durable Functions activity
4. Durable Functions entity
5. Durable Functions Entity HTTP starter
6. Durable Functions HTTP starter
7. Durable Functions orchestrator
8. Azure Event Grid trigger
9. Azure Event Hub trigger
10. HTTP trigger
11. IoT Hub (Event Hub)
12. Kafka output
13. Kafka trigger
14. Azure Queue Storage trigger
15. RabbitMQ trigger
16. SendGrid
17. Azure Service Bus Queue trigger
18. Azure Service Bus Topic trigger
19. SignalR negotiate HTTP trigger
20. Timer trigger
Choose option: 10
HTTP trigger
Function name: [HttpTrigger] sampleHttpTrigger
Writing /Users/s.y/dev/10.azure/azure-functions3/sampleHttpTrigger/index.ts
Writing /Users/s.y/dev/10.azure/azure-functions3/sampleHttpTrigger/function.json
The function "sampleHttpTrigger" was created successfully from the "HTTP trigger" template.
Yusuke SatakeYusuke Satake

できた。


Azure Functions Core Tools
Core Tools Version:       4.0.3971 Commit hash: d0775d487c93ebd49e9c1166d5c3c01f3c76eaaf  (64-bit)
Function Runtime Version: 4.0.1.16815

[14:21:41] Found 0 errors. Watching for file changes.


Functions:

	sampleHttpTrigger: [GET,POST] http://localhost:7071/api/sampleHttpTrigger

For detailed output, run func with --verbose flag.
[2023-07-11T05:21:51.165Z] Host lock lease acquired by instance ID '000000000000000000000000D0D45DFF'.
[2023-07-11T05:21:54.888Z] Executing 'Functions.sampleHttpTrigger' (Reason='This function was programmatically called via the host APIs.', Id=90658039-3d55-4413-ba6c-dd51f76705fe)
このスクラップは2023/07/11にクローズされました