Created by:
- Backend
- Frontend
- Getting Started
- Built With
- Database Visualization
- Testing
- Gems and Testing
- Learning Goals
- API Endpoints
- Endpoint Details
This is an API Repository built in C# leveraging .NET 8 and deployed on Azure.
Using this API will allow you to get traditional breads that originate from each country around the world. While we here at "le Belongea Boulangerie" care about home made bread; more countries, more breads, more recipes coming soon.
We are creating this API using .NET and in Rails. Running Load Tests on each of the API and comparing the efficiency.
C# && .NET
Ruby on Rails
Furture Features
-
Install C# and .NET 8
-
Install Azure Data Studio && MS SQL Sever here
-
Install Docker
- Before anything create your Microsoft account and set up your Azure Portal
- Sign In or create a Free Account.
- A free account comes with $200 USD in credits.
- In your repo have install the Azure CLI
- Mac
brew upgrade && brew install azure-cli
- If you're having problems with those commands try running the code one at a time.
- Once you have your portal set up and the azure-cli installed run the following
az login
- Once logged in run the following to build your webapp.
dotnet build --configuration Release
- Now deploy the app!
az webapp up --sku F1 --name "YOUR_APP_NAME" --os-type linux
- Replace the OS Type with either windows or linux. For smaller apps there's no difference.
- Now go to the Azure Portal. and checkout
App Services
. You should be able to see your new app. - From Azure Portal home page navigate tho
SQL databases
. Click the plus icon to create your db. Follow the prompts and create your db.
- Save your password.
- Navigate to your db, this will be your new
DefaultConnection
string in your repo.
If you are working on Mac with a M1 or M2 chip select the 'Apple Chip' options when downloading.
Since this db is hosted via a Dockerized Azure Database studios you will have access to the current production db.
If you are wanting to add to and add more to the db, please create your own local testing db. To do this create a new dockerized azure db studios db and change the DefaultConnection
string in appsettings.json
file.
The SQLScripts
file contains all the SQL needed to create the Database and seed to be concurrent with the production environment. If adding anything here please add to the Migrations
folder or to the bottom of SQLScripts
with data and the SQL used.
Press F5
on Windows and the green play button with the 'bug' on the Mac task bar to run localhost.
This will take you to Swagger at http://localhost:5000/swagger/index.html
.
Here you will see all the endpoints and can test the responses.