RedBirdOBX / ElleChristineV2.Web

0 stars 0 forks source link

Solve for https #5

Open RedBirdOBX opened 1 month ago

RedBirdOBX commented 1 month ago

This is a real issue. We need to come up with a solution that allows us to run the web site at https w/o costing a fortune.

gatortarheel commented 1 month ago

you do not like the storage / CDN solution?

RedBirdOBX commented 1 month ago

This wouldn't work if we're going to use Postgres. Not unless we did all the api calling in javascript.

gatortarheel commented 1 month ago

// Define the URL of the API
const apiUrl = 'https://api.example.com/data';

// Fetch data from the API
fetch(apiUrl)
  .then(response => {
    // Check if response is successful
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    // Parse the JSON data
    return response.json();
  })
  .then(data => {
    // Data is now available for use
    console.log(data);
    // You can now manipulate or display the data as needed
  })
  .catch(error => {
    // Handle any errors that occur during the fetch
    console.error('There was a problem with the fetch operation:', error);
  });
`
gatortarheel commented 1 month ago

not impossible, but ok

gatortarheel commented 1 month ago

https://www.perplexity.ai/search/what-is-the-nwCJG3AXRr.NIXvx95Aldw#0

To host an SSL website on Azure in the most cost-effective way, you have a few options:

  1. Use App Service Managed Certificates (Preview): This is the cheapest option as it provides free SSL certificates for custom domains on Azure App Service. However, it is currently in preview and has some limitations like no support for wildcard certificates or exporting the certificate.[4] To use this, you need to be on the Basic App Service Plan or higher, which starts at $13.64/month.

  2. Purchase a Standard SSL Certificate from Azure: You can buy a single-domain SSL certificate from Azure for around $70/year and use it with your Azure App Service.[5] This allows you to stay on the Shared/Free tier of App Service, which is the cheapest compute option but doesn't include free SSL.

  3. Use a Third-Party SSL Provider: You can purchase a cheap SSL certificate (single-domain or wildcard) from a third-party SSL vendor like SSL Dragon ($57/year for wildcard)[2] or SSLTrust (under $15/year for multi-domain)[3]. Then, you can import and use this certificate on your Azure App Service. Again, you'll need at least the Basic App Service Plan tier to use a custom SSL certificate.

In summary, the absolute cheapest way is to use the App Service Managed Certificates (Preview) feature with the Basic App Service Plan, which comes to around $13.64/month.[4] If the preview limitations don't work for you, purchasing a cheap third-party SSL certificate and using it on the Basic App Service Plan would be the next most cost-effective option.[2][3]

Citations: [1] https://stackoverflow.com/questions/34279450/ssl-on-azure-shared-plan [2] https://www.reddit.com/r/AZURE/comments/12u97fb/implementing_a_tlsssl_certificate/ [3] https://www.ssltrust.com/ssl-certificates/cheapest-multi-domain-ssl [4] https://azure.microsoft.com/en-us/updates/secure-your-custom-domains-at-no-cost-with-app-service-managed-certificates-preview/ [5] https://azure.microsoft.com/en-us/updates/azure-app-service-ssl-certificates-available-for-purchase/

gatortarheel commented 1 month ago

If we can update the page to use javascript to fetch data from an API - either a function or WebApps API - would that be sustainable?

Or do you want it be C# / Blazor front end?

RedBirdOBX commented 1 month ago

Sorry for the diversions. We have two Projects going on; the UI "Web" and the backend API. Both projects are in GitHub.

To answer your question, I'd prefer vanilla Razor Pages for now. The true task at hand is to use Postgres to feed the UI so I'm cranking out a API which will be ready pretty soon and go live: [image: image.png]

Back End Steps:

  1. Stand up API using Sql db - WIP
    1. add logging - wip
    2. clean up program.cs
    3. deploy
  2. Build out middleware in API to use Postgres.
  3. Switch when ready. Consumer of API doesn't know any different.

Front End Steps:

  1. Wire up UI to call API as soon as it's ready.
  2. (unrelated) solve for custom domain issue, what am I doing wrong?

D. Shane Fowlkes 804.475.5378


On Fri, May 31, 2024 at 4:38 PM Russell Smith @.***> wrote:

If we can update the page to use javascript to fetch data from an API - either a function or WebApps API - would that be sustainable?

Or do you want it be C# / Blazor front end?

— Reply to this email directly, view it on GitHub https://github.com/RedBirdOBX/ElleChristineV2.Web/issues/5#issuecomment-2142946680, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZM774RXLNSPM5VNMNQUNTZFDNTVAVCNFSM6AAAAABINBHF4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBSHE2DMNRYGA . You are receiving this because you authored the thread.Message ID: @.***>

gatortarheel commented 1 month ago

I agree that the app service plans are expensive.

It looks like we can do react...

https://learn.microsoft.com/en-us/azure/static-web-apps/

https://learn.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=react

also Blazor!

RedBirdOBX commented 1 month ago

Yep. Postgres first. We can do whatever front-end we want and have fun.....

On Fri, May 31, 2024, 5:46 PM Russell Smith @.***> wrote:

I agree that the app service plans are expensive.

It looks like we can do react...

https://learn.microsoft.com/en-us/azure/static-web-apps/

https://learn.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=react

also Blazor!

— Reply to this email directly, view it on GitHub https://github.com/RedBirdOBX/ElleChristineV2.Web/issues/5#issuecomment-2143021095, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZM774WUKHKK2HOVAW5H23ZFDVT5AVCNFSM6AAAAABINBHF4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGAZDCMBZGU . You are receiving this because you authored the thread.Message ID: @.***>