Coder Social home page Coder Social logo

eaba / akka-http-scala-js-websocket-chat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jrudolph/pekko-http-scala-js-websocket-chat

0.0 1.0 0.0 493 KB

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

License: MIT License

HTML 1.80% Scala 97.95% Shell 0.26%

akka-http-scala-js-websocket-chat's Introduction

Akka HTTP / Scala.js / Websocket Chat App

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

To run:

sbt

> project backend
> re-start

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/scala-2.11/cli-assembly-0.1-SNAPSHOT.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.

akka-http-scala-js-websocket-chat's People

Contributors

cridmann avatar jrudolph avatar nremond avatar rgwilton avatar seanmcl avatar splade avatar

Watchers

 avatar

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.