Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
samipak458 committed Feb 3, 2024
0 parents commit a22f07e
Show file tree
Hide file tree
Showing 12 changed files with 687 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
KEY=569e7f78bc714dd091cd870f9bf102e6
ENDPOINT=https://api.cognitive.microsofttranslator.com/
LOCATION=southeastasia

# Note: To find your key and location, you can follow the link: https://learn.microsoft.com/en-gb/training/modules/python-flask-build-ai-web-app/5-exercise-create-translator-service
86 changes: 86 additions & 0 deletions Azure App Service.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# What is Azure Apps Service?
From your source code to worldwide availability, Azure Apps addresses the difficult difficulties. While you concentrate on designing your project, Azure Apps creates and hosts it using GitHub or Azure DevOps.

Azure App Service is a fully-managed platform by Microsoft that simplifies web app deployment and management. It supports multiple programming languages, offers automatic scaling for high traffic, and integrates smoothly with other Azure services. With easy deployment, continuous integration, and robust security features, developers can focus on creating exceptional web experiences while Azure takes care of the infrastructure and maintenance aspects. It's a launchpad for developers to bring their web projects to life with speed, reliability, and scalability—all in one place! 🚀

Azure App Service is like having your own personal launchpad for your web projects. It's a fully-managed platform provided by Microsoft that takes care of all the complex stuff, so you can focus on creating amazing experiences for your users.

## Here's what makes Azure App Service so awesome:

### Easy Deployment
It's as simple as uploading your web code or connecting it to a code repository like GitHub. No need to worry about server configurations or network settings. Just click a few buttons, and your app will be up and running in no time!

### Scalability
Imagine your app goes viral, and thousands (or millions!) of users want to access it simultaneously. Azure App Service can handle the traffic spikes effortlessly. It automatically scales up or down based on demand, ensuring a smooth user experience for everyone.

### Supported Languages
Whether you love coding in C#, Java, Python, Node.js, or PHP, Azure App Service has got you covered. You can write your app in the language you're most comfortable with.

### Continuous Integration & Deployment (CI/CD)
This cool feature lets you automatically deploy your code changes whenever you push to your repository. It saves you time and reduces the risk of human errors during deployment.

### Security & Compliance
Azure takes security very seriously. It provides robust security features and compliance certifications, ensuring that your app and your users' data stay safe and protected.

### Integration with Other Azure Services
You can easily connect your app to other awesome Azure services like databases, storage, authentication, and more. It's like building a dream team of services to enhance your app's capabilities.

## Create the Azure App
You're a web developer who has developed a web app. A web app is often composed of HTML, JavaScript, or CSS files and can be developed manually or by using a framework.

Before you can deploy the app to Azure, you need to build it.

- Create a repository for your app on GitHub.
- Run the app locally and view it via a browser.

With the copy created locally, you’re all set to start working on your code and site. Now you’ll explore how to deploy your site to the cloud. You’ll use Azure Apps to host your site. Using Azure Apps Service will allow you to quickly post your web site to the world. You can explore more [Azure Tips and Tricks: Web Apps Service](https://learn.microsoft.com/en-us/shows/azure/app-service?wt.mc_id=studentamb_202028) to learn more.

Next, open Azure portal by going on **https://azure.com/**.

` Note: If you don't have Azure free subscription, you can get free subscription by going on https://azure.microsoft.com/en-us/free/students from there you get 100$ credits`

1. Search for **Azure App Service** using searchbar.
![image](https://github.com/samipak458/Online-AI-Text-Translator/assets/52650290/31b8c995-f06b-4f5c-93ef-edeba7252421)

2. After clicking on it, you will see three options:
- Web App
- Static Web App
- Web App + Database

![image](https://github.com/samipak458/Online-AI-Text-Translator/assets/52650290/62310059-fec7-47ef-9d6f-241f4adffc7b)

3. Click on Web App as we're using another Azure service that is **Translator app service** in our web application.
4. Then it will ask about your project (web app) details.
- Select the subscription.
- Create new Resource group if don't created one before.
- Give a name to your web app.
- It ask for publish detail `select code` <br>
``` Note: If we migrating our static web app to web app then we select static web app ```.
- Then select runtime stack in our case it is **Python 3.11**.
- Then operating system, leave it default.
- Then select the region (While selecting region select the nearest region to your country).
- Then it ask for pricing plan `select Basic B1` pricing plan.
- Click on next deployment button after adding all the details.
![image](https://github.com/samipak458/Online-AI-Text-Translator/assets/52650290/d15c912f-1870-45f4-94a0-8076d94f91b1)
- Enable GitHub actions for continuous development.
![image](https://github.com/samipak458/Online-AI-Text-Translator/assets/52650290/2413dd73-636f-4053-b548-24b5212f594d)
- Then add your GitHub repo detail that you created for your web app.
![image](https://github.com/samipak458/Online-AI-Text-Translator/assets/52650290/ea442cd2-87fb-4e22-b5c2-a00c80263185)
- Then click on Review + create button. It is optional to edit network and monitor details in our case we don't need it.
![image](https://github.com/samipak458/Online-AI-Text-Translator/assets/52650290/55213b86-6320-4e02-b952-69226c77177c)
- Review all the details you added and click on **create** button.

It will take seconds in deploying your website. Then your website will be successfully deployed. You can see default domain (https://online-text-translator.azurewebsites.net/), click on it.
![image](https://github.com/samipak458/Online-AI-Text-Translator/assets/52650290/d8d5f928-d11b-4e00-9f93-01fc17ab2dce)

You see the website is hosted on Azure App Service.
![image](https://github.com/samipak458/Online-AI-Text-Translator/assets/52650290/cf83e728-9a21-44b4-a5e3-74507ece5785)



### Note: If you want to host your static app which is build using framework then follow this [Publish an Angular, React, Svelte, or Vue JavaScript app with Azure Static Web Apps](https://docs.microsoft.com/en-us/learn/modules/publish-app-service-static-web-app-api/2-exercise-get-started?wt.mc_id=studentamb_202028)

## Resource
- Learn more about [Azure Apps Service](https://learn.microsoft.com/en-us/azure/app-service?wt.mc_id=studentamb_202028)
- Learn more Create & deploy [Azure Apps Service](https://learn.microsoft.com/en-us/shows/azure-demo-series/create-deploy-app-services?wt.mc_id=studentamb_202028)
- Learn about [Azure Static Web App Service](https://learn.microsoft.com/en-us/azure/static-web-apps?wt.mc_id=studentamb_202028)
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
Loading

0 comments on commit a22f07e

Please sign in to comment.