This webapi application is a code challenge exercise for Quicken Loans.
- Visual Studio Code
- C# for Visual Studio Code
- .Net 5.0 SDK
- From Visual Studio Code, open the integrated terminal
- Change to the folder that will contain the project folder (ex. C:\projects or /home/user/projects )
- from terminal window execute:
git clone https://github.com/rhkean/linkmir.git
cd linkmir
code -r linkmir
- When prompted (in the lower right corner) to load missing dependencies, select 'Yes'
- The project should now compile and run at http://localhost:5000/Zja8syffynb
POST: http://localhost:5000
body:
{
"link": "http://www.microsoft.com"
}
response:
{
"link": "http://www.microsoft.com"
"shortlink": "http://localhost:5000/aazr35wn82b"
}
GET: http://localhost:5000/aazr35wn82b
response:
{
"link": "http://www.microsoft.com/",
"shortLink": "http://localhost:5000/aazr35wn82b"
}
GET: http://localhost:5000/stats/aazr35wn82b
response:
{
"domain": "microsoft.com",
"subdomain": "www",
"submissionCount": 1,
"accessCount": 2,
"link": "http://www.microsoft.com/",
"shortLink": "http://localhost:5000/aazr35wn82b"
}
GET: http://localhost:5000/stats
body:
{
"subdomain": "*",
"domain": "microsoft.com"
}
response:
{
"domain": "microsoft.com",
"subDomain": "*",
"links": [
{
"domain": "microsoft.com",
"subdomain": "www",
"submissionCount": 1,
"accessCount": 2,
"link": "http://www.microsoft.com/",
"shortLink": "aazr35wn82b"
}
],
"matchingLinksCount": 1,
"totalSubmissionCount": 1,
"totalAccessCount": 2
}
This example is running in a Docker container on a Raspberry Pi 4 with a Dietpi 32-bit Debian image.
http://keanconsulting.com/stats/o7g6hdN1qhg
This is my first Visual Studio Code for LInux application written in a ChromeOS chroot environment. I have extensive previous experience with Visual Studio, however my chromebook is my only current build machine. While not the best or most efficient way to demonstrate my coding skills, I understand that this exercise is more focused on seeing how I think through the coding process.
With that said, I have begun this webapi utilizing a Microsoft Tutorial to build from. I believe this provided a quick start for success in this situation, however this may result in remnants of the sample project from the tutorial due to time constraints.