Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adityastic/tinyurl-service-fabric

Tiny URL with microservices architecture using service-fabric
https://github.com/adityastic/tinyurl-service-fabric

azure microservices reliable-collections service-fabric short-url tiny-url

Last synced: about 2 months ago
JSON representation

Tiny URL with microservices architecture using service-fabric

Awesome Lists containing this project

README

        

# TinyURL

![.NET CI](https://github.com/adityastic/TinyURL-Service-Fabric/workflows/.NET%20CI/badge.svg) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/cc70c6df1c9048fab1b0b945902ca36c)](https://www.codacy.com/manual/adityastic/TinyURL-Service-Fabric?utm_source=github.com&utm_medium=referral&utm_content=adityastic/TinyURL-Service-Fabric&utm_campaign=Badge_Grade)

This is an implimentation of Tiny URL using [Azure Service Fabric](https://azure.microsoft.com/en-us/services/service-fabric/)

## Deploy it on your Azure
[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/)

## API Doc

| **API** | **Description** | **Returns** | **Parameters** |
|---------------|-----------------------------|-----------------------------|----------------------------|
| /createURL | Create ShortURL for a link | An object with the shortURL.
eg: In JSON :
```{ "shortUrl" : "http://localhost:8471/c" }``` | **Form Parameters**:
  - **URL** : String (URL that you want to convert)
  - **partition** : int (partition id to fetch a specific reliable collection)
| /{shortURL} | Redirects you to the stored URL | A Redirect to the stored URL. | **Route/Path Parameter**:
  - **shortURL** : String (short url returned after /createURL API)
**Query Parameter**:
  - **partition** : int (partition id to fetch a specific reliable collection)

## Pre-Requisites
1. [Visual Studio](https://visualstudio.microsoft.com/vs/)
2. [Service Fabric Development Environment](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started)

## Setup Environment
1. ```git clone https://github.com/adityastic/TinyURL-Service-Fabric``` to your desired location.
The Directory should look something like this:
![image](https://user-images.githubusercontent.com/11988517/87421735-56008c00-c5cf-11ea-849a-79d0eaa1b91f.png)
2. Double-CLick on TinyURL.sln or Open this folder using [Visual Studio](https://visualstudio.microsoft.com/vs/).

## Running Tiny URL on local dev cluster
> Note: Make sure you have a minimum 5 Node Service Fabric Cluster on your machine. Checkout [Setting up a Development Environment](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started).
1. `Right-Click` on the TinyURL Project.
2. Select `Debug`.
3. Select `Start new instance`.

Image for reference:
![image](https://user-images.githubusercontent.com/11988517/87422175-171f0600-c5d0-11ea-8904-66b236992baf.png)

## License
This project is Free and Open Source software. The project is licensed under the [MIT](LICENSE).