Skip to content

LoyolaChicagoCode/primechecker-azure-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

primechecker-azure-java

An Azure Function implemented in Java for checking whether or not a number is prime.

Build status

  • Dynamic
    7-day Uptime Azure Build and deploy Java project to Azure Function App - primechecker Commit Activity Average time to resolve an issue Percentage of issues still open
  • Structural
    Code Size codecov CodeQL Codacy Badge CodeFactor Maintainability
  • Other
    License

Learning objectives

  • Show how CPU-intensive computation can be off-loaded from a mobile app to the cloud, by comparison to a mobile device, an unlimited resource for computation and storage.

  • End-to-end example of continuous integration (CI), continuous deployment/delivery (CD), and DevOps in Java using Azure Functions.

See also the corresponding mobile app.

How to use

To use, put the number to be checked in the query string of the deployed function, e.g.

https://primechecker.azurewebsites.net/api/isPrime?number=7

Some sample primes to try

Some non-primes to try

Development

Prerequisites

See Quickstart: Create a Java function in Azure from the command line.

Building and testing locally

Test with

$ mvn test

Run locally with

$ mvn azure-functions:run

and use via the provided local URLs.

Managing via the Azure portal

Visit the Function App section of the Azure portal.

A function app can have one or more functions. Drill into a specific function:

Home > Function App > primechecker > isPrime

In it's Code + Test section, you can verify the mapping between the function's published entry point and the corresponding method implementation:

"entryPoint": "edu.luc.cs.cs371.primechecker.web.PrimeCheckerFunction.run",

JSON configuration for isPrime function

There, you can press the Test/Run button to interact directly with the function:

JSON configuration for isPrime function

JSON configuration for isPrime function

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages