Skip to content
This repository has been archived by the owner. It is now read-only.
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.vscode
src/LinkyLink
tests/LinkyLink.Tests
LinkyLink.sln
README.md
global.json
theurlist_collection.json
theurlist_localhost_env.json

README.md

The Urlist - Backend

The backend for this project was built as a serverless API using Azure Functions and .NET. All the data is stored in a Cosmos DB collection using the SQL API.

Build and run the backend locally

Get the prerequisites

Optional

Run the serverless backend

Navigate into backend folder

cd backend/src/LinkyLink

Build the project

dotnet build

Rename the local.settings.sample.json file to local.settings.json

Linux & MacOS

mv local.settings.sample.json local.settings.json

Windows command line

REN local.settings.sample.json local.settings.json

Update the local.settings.json file with your Application Insights key to the APPINSIGHTS_INSTRUMENTATIONKEY setting. You could also just remove this if you don't want to use Application Inisghts.

Create an a Cosmos DB instance in Azure using the SQL API. Update the local.settings.json file with your Cosmos DB connection string in the LinkLinkConnection settings.

Start the function via the command line

func start

func start

Alternatively, start a debuging session in Visual Studio or Visual Studio Code.

Try out the API with Postman

  • Start up Postman and import the theurlist_collection.json file that's in the backend folder
  • Next import the theurlist_localhost_env.json file. That includes the Localhost environment settings.
  • Set your environment to Localhost

postman

  • Run Save Bundle to add some data to Cosmos DB. Next run Get bundle for vanity url to retrieve the entry you just created.

If everything was setup correctly, your should see a response that resembles the following.

postman

You can’t perform that action at this time.