<commit_before># LandsWar - Server

[![dependency status](https://david-dm.org/landswar/server.svg)](https://david-dm.org/landswar/server)
[![dev-dependencies status](https://david-dm.org/landswar/server/dev-status.svg)](https://david-dm.org/landswar/server#info=devDependencies)

The LandsWar server which contains the API and the WebSocket server.

## What is LandsWar?

LandsWar is a turn-based tactics online video game inspired by Advance Wars.

There are 3 types of units in the game (we don't have define the number of units in each category):

- ground units
- air units
- naval units

Also, there are a lot of different type of ground with bonus or malus for units.

With LandsWar, you will be able to play against your friend and people from all around the world.

## How to play?

Coming soon...

## How to run locally?

I use async/await so you need node.js v7 minimum to run it with the harmony flag: ```--harmony-async-await```.
Since the v7.6.0, async/await have been ported so you don't need to use the flag.

You need first to install ```docker-compose``` to start databases (Percona and Redis).

Then, you can run these commands:
```
npm install
npm run start-docker
npm start
```

If you have Postman installed, you can get and test all available routes with Postman:

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/cb70cbff411577e38581)

### NPM commands

- ```npm run stop-docker``` To stop docker instances.
- ```npm run debug``` To start the app with the debugger on port 5858.
- ```npm run lint``` To run the ESLint code check.
- ```npm run fix-code``` To fix simple norm errors with ESLint.

### Documentation

The API documentation is available here: [https://landswar.github.io/server/](https://landswar.github.io/server/)<commit_msg>yarn added<commit_after># LandsWar - Server

[![dependency status](https://david-dm.org/landswar/server.svg)](https://david-dm.org/landswar/server)
[![dev-dependencies status](https://david-dm.org/landswar/server/dev-status.svg)](https://david-dm.org/landswar/server#info=devDependencies)

The LandsWar server which contains the API and the WebSocket server.

## What is LandsWar?

LandsWar is a turn-based tactics online video game inspired by Advance Wars.

There are 3 types of units in the game (we don't have define the number of units in each category):

- ground units
- air units
- naval units

Also, there are a lot of different type of ground with bonus or malus for units.

With LandsWar, you will be able to play against your friend and people from all around the world.

## How to play?

Coming soon...

## How to run locally?

I use async/await so you need node.js v7 minimum to run it with the harmony flag: ```--harmony-async-await```.
Since the v7.6.0, async/await have been ported so you don't need to use the flag.

You need first to install ```docker-compose``` to start databases (Percona and Redis).

Then, you can run these commands:
```
yarn
yarn run start-docker
yarn start
```

If you have Postman installed, you can get and test all available routes with Postman:

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/cb70cbff411577e38581)

### NPM commands

- ```yarn run stop-docker``` To stop docker instances.
- ```yarn run debug``` To start the app with the debugger on port 5858.
- ```yarn run lint``` To run the ESLint code check.
- ```yarn run fix-code``` To fix simple norm errors with ESLint.

### Documentation

The API documentation is available here: [https://landswar.github.io/server/](https://landswar.github.io/server/)
{'fraction_non_alphanumeric': 0.11510791366906475, 'fraction_numerical': 0.012174875484228001, 'mean_word_length': 4.156918687589158, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6356964', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1110, 'n_words': 451}