Skip to content

Simple Scala/http4s-based web service for prime number checking.

Notifications You must be signed in to change notification settings

LoyolaChicagoCode/primenumbers-http4s-scala

Repository files navigation

Project metrics

  • In-process
    Scala CI codecov Commit Activity Average time to resolve an issue Percentage of issues still open
  • Complexity
    Code Size Codacy Badge Maintainability Technical Debt CodeFactor
  • Depedencies/composition analysis
    Scala Steward badge
  • Availability (by deployed instance)
    7-day Uptime Linode 7-day Uptime Oracle Cloud
  • 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 Scala.

See also the corresponding mobile app.

How to use

Test with

$ sbt test

Run with

$ sbt run

or

$ sbt stage
$ ./target/universal/stage/bin/primenumbers-http4s-scala

or deploy to a suitable cloud provider, such as Oracle.

Then, http://host/n returns

  • 200 OK if n is prime
  • 404 Not Found otherwise

Sample prime numbers to try

Sample non-prime numbers to try

References

About

Simple Scala/http4s-based web service for prime number checking.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published