ElasticApartment is a Web API built with .NET 5 and ElasticSearch
Start project ElasticApartment.API from visual studio and test the Post endpoint with swagger or Postman/cURL:
curl --location --request POST 'https://localhost:5001/api/Search' \
--header 'Content-Type: application/json' \
--data-raw '{
"searchPhase": "Jefferson Park",
"market": ["Austin", "DFW"],
"limit": 5
}'Start project ElasticApartment.Insert from visual studio, make sure to have the correct path to json files in appsetting.json
The project ElasticApartment.SAM is the serverless alternative for this api, build using AWS SAM framework,
this API (or the Post method) we been using is presented a Lambda function with a API Gateway in front of it to recieve request.
Go to \ElasticApartment\ElasticApartment.SAM folder and run dotnet lambda deploy-serverless,
make sure to have correct aws credential profile and region in the aws-lambda-tools-defaults.json file
The serverless api is deployed to AWS and can be reach by:
curl --location --request POST 'https://wtwxpuj1tk.execute-api.eu-north-1.amazonaws.com/Prod/' \
--header 'Content-Type: application/json' \
--data-raw '{
"searchPhase": "Jefferson Park",
"market": ["Austin", "DFW"],
"limit": 5
}'