Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 1.73 KB

File metadata and controls

68 lines (45 loc) · 1.73 KB

C++ Chat App

Getting Started

Running

A docker image of the server and client is available on Docker Hub.

If you run it localy you will need to build the files (see Building). When you have client.out and/or server.out you can run these commands.

# to start the server
./server.out

# to start the client
./client.out

If you want to run the app inside docker you can run:

# to start the client
docker run -it thomascrmbz/cpp-chatapp-client

# to start the server
docker run -d --name chatapp-server thomascrmbz/cpp-chatapp-server

Building

Dependencies

This app has 2 dependencies:

You need to download the source files and insert them in the build commands.

Commands

There are 2 options to build this chat app, build it localy or build a docker image (preferred).

To build it localy

# build all
make HTTP_LIB=../cpp-http-server WEBSOCKET_LIB=./cpp-websocket

# build client only
make client HTTP_LIB=../cpp-http-server WEBSOCKET_LIB=./cpp-websocket

# build server only
make server HTTP_LIB=../cpp-http-server WEBSOCKET_LIB=./cpp-websocket

To build the docker image

# this wil build a server and a client image
make docker DOCKER_CLIENT_NAME=example/cpp-chatapp-client DOCKER_SERVER_NAME=example/cpp-chatapp-server HTTP_LIB=../cpp-http-server WEBSOCKET_LIB=./cpp-websocket

License

This project is licensed under the MIT License.