Skip to content
프로젝트

jrudolph/pekko-http-scala-js-websocket-chat

GitHub에서 보기

소개

An example app that integrates pekko-http and scala-js to implement a websocket chat

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Pekko HTTP / Scala.js / Websocket Chat App

A simple chat app that uses a pekko-http backend and a scala.js frontend to implement a simple websocket based chat application.

To run:

sbt

> project backend
> reStart

Navigate to http://localhost:8080/.

You can build a fully self-contained jar using assembly in the backend project.

Configuration

You can set app.interface and app.port in application.conf to configure where the server should listen to.

This also works on the command line using JVM properties, e.g. using re-start:

> re-start --- -Dapp.interface=0.0.0.0 -Dapp.port=8080

will start the server listening on all interfaces.

CLI

The cli project contains a command line client for the chat to demonstrate the Websocket client and how to deal with console input in a streaming way.

CLI Screencast

It runs best directly from a terminal.

Start the server as explained above. Then, to build a fat jar use

sbt

> project cli
> assembly

Run

java -jar cli/target/cli.jar

or

./chat

Here's another screencast that shows live tab completion in action:

CLI completion screencast

Known issues

The "frontend"

There isn't more than absolutely necessary there right now.

관련 프로젝트 살펴보기

불러오는 중…