Skip to content

adi-epshtain/ChatExercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatExercise

Chat Server

1. using docker-compose builds, (re)creates, starts all the containers:

docker-compose build docker-compose up -d

2. build the client docker image and run the 2 or more docker containers:

docker build -t client_image . docker run --network=host -p 5555:5555 -it --name client_container1 client_image docker run --network=host -p 5555:5555 -it --name client_container2 client_image

stop docke container & rm all images:

docker-compose down docker image prune -a -f docker stop <container_name> docker rmi <image_id>

open swagger getting API documentation:

open URL: http://127.0.0.1:8000/api/docs

working locally without docker (Windows machine):

only 1st time create virtual env:

py -m venv env

activaite virtual env from vscode terminal:

Set-ExecutionPolicy Unrestricted -Scope Process .\env\Scripts\activate

install requirements:

py -m pip install -r requirements.txt

running server (or from vscode run Python: FastAPI server from launch.json):

py -m uvicorn main:app --reload --host 0.0.0.0 --port 8000

running client (or from vscode run client from launch.json):

py ./main.py

using mongoDB locally: running terminal as admin and from cmd the running mongo server by press: mongod

version1: without DB

version2: using postgreSQL

version3: using MongoDB no sql

About

Chat Exercise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors