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

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

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.

探索相关项目

加载中…