📝 update Readme

docker-deployment
Vincent ASTOLFI 9 months ago
parent ac98851659
commit 06f8b6dbcf

@ -1,7 +1,7 @@
# Maettleship # Maettleship
Maettleship is a simple online battleship game that I design for maë (my grilfriend) when lectures are boring. Maettleship is a simple online battleship game that I design for maë (my grilfriend) when lectures are boring.
It's made entirely in javascript using nodejs for the server part with socketio and express module. It's made entirely in javascript using nodejs for the server part with socketio and express module. I also use mysql for all my database part. Finally, I use docker and a vps that I pay for online deployment
# Requirement # Requirement
@ -9,15 +9,21 @@ To use maettleship you'll need the following app on your computer
* node js and npm * node js and npm
* mysql * mysql
* A firefox derived web browser (Don't know why it doesn't work on chrome)
# Installation # Installation
Later, maettleship will be usable online but you can test it localy now if you want ! ### Online
Follow those first steps to get started I recently add a branch called `docker-deployment` which I use to deploy maettleship on an online vps. I can't give you the url now cause there is still a lot of security problem that I want to fix first, but be patient it'll come.
### Locally
Follow those first steps to get started if tou want to run maettleship locally
``` ```
git clone https://github.com/viastolfi/maettleship.git git clone https://github.com/viastolfi/maettleship.git
cd maettleship
npm install npm install
``` ```
@ -28,19 +34,20 @@ mysql -u user -p
> mysql source db_script.sql > mysql source db_script.sql
``` ```
Finally, you need a `.env`file with your personnal mysql information so follow those steps. Finally, you need a `.env`file with your personnal mysql information so follow those steps. You also need this file to specify your cookie's private key so you can create them
``` ```
touch .env touch .env
``` ```
The .env file should look like thah The .env file should look like that
``` ```
DB_USER=userName DB_USER=userName
DB_PASSWORD=UserPassword DB_PASSWORD=UserPassword
DB_NAME=maettleship DB_NAME=maettleship
DB_HOST=localhost DB_HOST=localhost
COOKIE_SECRET_KEY=secret_key
``` ```
Now you can start the server using the following command on your terminal. Now you can start the server using the following command on your terminal.
@ -58,27 +65,31 @@ The current state of maettleship is the following one
- [X] Player left the game situation handled - [X] Player left the game situation handled
- [X] End game (partially handled) - [X] End game (partially handled)
- [X] Create an account and add it on the database - [X] Create an account and add it on the database
- [X] Connection to your account
# TODO # TODO
Those point are the feature I still need to introduce Those point are the feature I still need to introduce
- [ ] Security improvement (hashed password, sql injection handling)
- [ ] Fix all the problems linked to my rooms implementation
- [ ] Rematch - [ ] Rematch
- [ ] Connection to your account - [ ] Player historic (link to its account)
- [ ] Player historic (link to his account)
- [ ] Global scoreboard - [ ] Global scoreboard
- [ ] General error handling - [ ] General error handling
- [ ] (lot of) debug - [ ] (lot of) debug
# Author # Author
This project is entirely made by me (ASTOLFI Vincent) This project is entirely made by me (ASTOLFI Vincent). I suggest you to check on my github profile if you want to see the other project I've done for my studies or the ones I do in my free time.
# Acknowledgement # Acknowledgement
Here is a cool list of the different docs I use on this project Here is a cool list of the different docs I used on this project
- [socket.io documentation](https://socket.io/fr/docs/v4/) - [socket.io documentation](https://socket.io/fr/docs/v4/)
- [express documentation](https://expressjs.com/) - [express documentation](https://expressjs.com/)
- [mysql documentation](https://dev.mysql.com/doc/) - [mysql documentation](https://dev.mysql.com/doc/)
- [nodejs documentation](https://nodejs.org/docs/latest/api/) - [nodejs documentation](https://nodejs.org/docs/latest/api/)
This project aim to be fully functionnable one day so any recommendation is welcome !
Loading…
Cancel
Save