Skip to content
forked from typelevel/fs2-chat

Sample project demonstrating use of fs2-io to build a chat client and server

License

Notifications You must be signed in to change notification settings

gvolpe/fs2-chat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FS2 Chat

This repository contains a sample project that demonstrates the use of FS2 and related libraries by building a TCP based chat server app and client app.

Usage

To start the server application, run sbt "runMain fs2chat.server.ServerApp". This will start a server on TCP port 5555. Alternatively, run sbt "runMain fs2chat.server.ServerApp --port <alternatePort>" to run on a different port.

To start the client application, run sbt "runMain fs2chat.client.ClientApp --username <desiredUsername>". This will start a client that attempts to connect to 5555 on localhost. Run sbt "runMain fs2chat.client.ClientApp --address <serverIp> --username <desiredUsername>" if running the server on a different host.

Alternatively, run sbt universal:stage to build client and server apps under target/universal/stage/bin. Then run ./target/universal/stage/bin/server-app to start the server and ./target/universal/stage/bin/client-app --username <desiredUsername> to start a client.

Requirements

A Redis instance needs to be running (used to persist messages count per user). Get started quickly with:

docker run -p 6379:6379 redis:5.0.0

About

Sample project demonstrating use of fs2-io to build a chat client and server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%