Skip to content
Uğur Güney edited this page Apr 6, 2019 · 10 revisions
  • file:///C:/Users/veliu/Documents/repos/cooperat-io/client.html

Command to list the nicknames of players:

cat main.log | sed -rn "s/.*, (\w+) .*/\1/p" | sort | uniq | less

Installation on server

# connect to my server from desktop/laptop
ssh ugur_ec2
# Update package list
sudo apt update
sudo apt install software-properties-common
# Add repository from where to pull Python 3.7 binary
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update

# Install Python 3.7
sudo apt install python3.7 python3.7-venv
# now `python3.7` should run Python3.
# Create Python virtual environment for the project
mkdir ~/envs  # if not exists
python3.7 -m venv ~/envs/cooperatio
source ~/envs/cooperatio/bin/activate
# test existence of pip in new environment
which pip  # returned `/home/ubuntu/envs/cooperatio/bin/pip`
sudo pip3 install --upgrade pip
# install the only requirement
sudo pip install websockets  # I shouldn't have to need `sudo` here >:(

cd ~
git clone https://github.com/vug/cooperat.io.git
cd cooperat.io
source ~/envs/cooperatio/bin/activate
python server.py

Nginx stuff

# Create/Edit conf
sudo vim /etc/nginx/sites-available/cooperatio
# Create soft link (once)
sudo ln -s /etc/nginx/sites-available/cooperatio /etc/nginx/sites-enabled/cooperatio
# test conf
sudo nginx -t
# restart nginx 
sudo systemctl restart nginx

Documentation

To Read

Game Design

Log

Clone this wiki locally