Giter Club home page Giter Club logo

akka-http-quickstart-scala.g8's Introduction

Akka HTTP quickstart in Scala

The Akka family of projects is managed by teams at Lightbend with help from the community.

Please see the quickstart guide for a walk through the code.

You can use Giter8 to create your own project from the quickstart. Or, download and extract the zip file(https://example.lightbend.com/v1/download/akka-quickstart-scala?name=akka-quickstart-scala) to a convenient location.

Prerequisites:

  • JDK 17
  • sbt 1.4.x or higher

Open a console and run the following command to apply this template:

sbt new akka/akka-http-quickstart-scala.g8

This template will prompt for the following parameters. Press Enter if the default values suit you:

  • name: Becomes the name of the project.
  • scala_version: Specifies the Scala version for this project.
  • akka_http_version: Specifies which version of Akka HTTP should be used for this project. Must be at least 10.6.0.
  • akka_version: Specifies which version of Akka should be used for this project. Must be at least 2.9.0.
  • organization: Specifies the organization for this project.

The template comes with the following sources:

  • QuickstartApp.scala -- contains the main method which bootstraps the application
  • UserRoutes.scala -- Akka HTTP routes defining exposed endpoints
  • UserRegistry.scala -- the actor which handles the registration requests
  • JsonFormats.scala -- converts the JSON data from requests into Scala types and from Scala types into JSON responses

Once inside the project folder use the following command to run the code:

sbt run

Template license

Written in 2017 by Lightbend, Inc.

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this template to the public domain worldwide. This template is distributed without any warranty. See http://creativecommons.org/publicdomain/zero/1.0/.

akka-http-quickstart-scala.g8's People

Contributors

2m avatar aaabramov avatar aludwiko avatar angelcervera avatar atisvagyok avatar chbatey avatar eed3si9n avatar ennru avatar henrikengstrom avatar ignasi35 avatar jiminhsieh avatar jlprat avatar johanandren avatar jonas avatar jrudolph avatar ktoso avatar laszlovandenhoek avatar mattkohl avatar patriknw avatar raboof avatar rstento avatar shkoder avatar thothmoses avatar vitojeng avatar witi83 avatar wpbs avatar wsargent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

akka-http-quickstart-scala.g8's Issues

SBT Warning: Conflicting versions of akka-stream

Consider the following:

> sbt new https://github.com/akka/akka-http-scala-seed.g8

This is a seed project which creates a basic build for an Akka HTTP
application using Scala.

name [My Akka HTTP Project]:
scala_version [2.12.3]:
akka_http_version [10.0.10]:
akka_version [2.5.4]:
organization [com.example]:

Template applied in .\my-akka-http-project

> cd my-akka-http-project
> sbt update

[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn]  * com.typesafe.akka:akka-stream_2.12:2.4.19 -> 2.5.4
[warn] Run 'evicted' to see detailed eviction warnings

How to get rid of the warning ?

Cf this related stackoverflow post.

Update paths image

@patrox 3 days ago
Is there an option to update the image file (docs/src/main/paradox/images/hello-akka-http.png) so it reflects the Paths from here ?

`sbt new` does not work

Hi,

In windows 10, it shows below error.

Exiting due to error in the template
File: C:\Users\TILAK~1.NAR\AppData\Local\Temp\giter8-331126442355577\src\main\g8\src\main\scala\com\lightbend\akka\http\sample\UserRegistryActor.scala, 30:53: 'created' came as a complete surprise to me

Update to newer version of Akka HTTP when available

In the new version of Akka HTTP the HttpApp changed one signature from route to routes. Please adapt this as well, and add a comment stating that this was called route in previous versions. Just in case somebody wants to use the seed for different Akka HTTP versions.

quickstarter does not work with sbt 1.1.6 nexus & set credentials

scala sbt new akka/akka-quickstart-scala.g8 --name=be-scala-akka-ods2

08:23:00 |   |   | Getting org.scala-sbt sbt 1.1.6 (this may take some time)...
08:23:03 |   |   | :: retrieving :: org.scala-sbt#boot-app
08:23:03 |   |   | confs: [default]
08:23:03 |   |   | 76 artifacts copied, 0 already retrieved (27669kB/252ms)
08:23:04 |   |   | Getting Scala 2.12.6 (for sbt)...
08:23:04 |   |   | :: retrieving :: org.scala-sbt#boot-scala
08:23:04 |   |   | confs: [default]
08:23:04 |   |   | 5 artifacts copied, 0 already retrieved (19632kB/85ms)
08:23:17 |   |   | [info] Set current project to data (in build file:/data/)
08:23:18 |   |   | [info] Set current project to data (in build file:/data/)
08:23:22 |   |   | [error] Unable to find credentials for [Sonatype Nexus Repository Manager @ nexus3-.. ].
08:23:22 |   |   | [error] Unable to find credentials for [Sonatype Nexus Repository Manager @ nexus3-.. ].
08:23:22 |   |   | [warn] module not found: org.scala-sbt.sbt-giter8-resolver#sbt-giter8-resolver_2.12;0.1.3
08:23:22 |   |   | [warn] ==== local: tried
08:23:22 |   |   | [warn] /home/jenkins/.ivy2/local/org.scala-sbt.sbt-giter8-resolver/sbt-giter8-resolver_2.12/0.1.3/ivys/ivy.xml
08:23:22 |   |   | [warn] ==== my-ivy-proxy-releases: tried
08:23:22 |   |   | [warn] https://nexus3-... /repository/ivy-releases/org.scala-sbt.sbt-giter8-resolver/sbt-giter8-resolver_2.12/0.1.3/ivys/ivy.xml
08:23:22 |   |   | [warn] ==== my-maven-proxy-releases: tried
08:23:22 |   |   | [warn] https://nexus3-... /repository/maven-public/org/scala-sbt/sbt-giter8-resolver/sbt-giter8-resolver_2.12/0.1.3/sbt-giter8-resolver_2.12-0.1.3.pom
08:23:22 |   |   | [warn] ::::::::::::::::::::::::::::::::::::::::::::::
08:23:22 |   |   | [warn] :: UNRESOLVED DEPENDENCIES ::
08:23:22 |   |   | [warn] ::::::::::::::::::::::::::::::::::::::::::::::
08:23:22 |   |   | [warn] :: org.scala-sbt.sbt-giter8-resolver#sbt-giter8-resolver_2.12;0.1.3: not found
08:23:22 |   |   | [warn] ::::::::::::::::::::::::::::::::::::::::::::::
08:23:22 |   |   | [error] java.lang.RuntimeException: Retrieval of org.scala-sbt.sbt-giter8-resolver:sbt-giter8-resolver:0.1.3 failed.

Prior sbt run against plains scala file does work without issues

Unresolved dependency when building

Hi,

When I try to run the project I have the following message :
sbt.ResolveException: unresolved dependency: org.scalariform#sbt-scalariform;1.8.2: not found

Regards,
Arnaud

sbt run fails

He,
sbt run returns no main class detected.

Need to fix the config to make the instructions from README valid.

Waldemar Wosiński

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.