This Azure Function is designed to be triggered via an HTTP call. It utilizes the Jackson library to parse incoming JSON data into a User object and then stores the parsed User object in Cosmos DB. This README.md file provides detailed information on the purpose of the function and how to set it up for local development.
To set up and run this Azure Function locally, follow the steps below:
Make sure you have the following frameworks and libraries installed on your local development environment:
-
Clone this repository to your local machine:
git clone https://github.com/JAVA-MSDT/azure-function-POC
-
Make sure that you have Azure Functions Core Tools & Azure Cosmos DB Emulator downloaded & installed locally.
-
Using your IDE (Maven extension)
mvn clean package
thenmvn azure-functions:run
or just Run the function itself from the green Run beside the function name. -
Using Postman you can send a request, attached a Postan collection for the easy testing.
-
Check the console the running port, because sometimes the port of randomly generated every run.
-
Make sure that you have run the Cosmos Emulator.