emotz / kladovka

Optimizer of inventory for games
http://kladovka.herokuapp.com/
MIT License
0 stars 0 forks source link

kladovka

Optimizer of inventory for games

Install required modules

npm install

Configuration

In root of Kladovka, you must create config.json, based on config.json.example.

{
    // Kladovka - multilanguage!
    // `default_language` can be "ru" or "en"
    "default_language": "en",

    // Kladovka can use mongoDB or memory database.
    // `db` can be "mongo" or "memory"
    "db": "mongo",

    // `db_url` is the address for your database server
    "db_url": "mongodb://localhost:27017/kladovka",

    // `express_port` is the port that will listen Kladovka
    "express_port": 8080
}

Build & Run

Docker

To startup service with bash:

docker-compose run --rm main bash

To connect to service already "up"ed:

docker-compose exec main bash

To build image:

docker-compose build

To run service:

docker-compose up

To run linter:

docker-compose run --rm main npm run lint

To run test:

docker-compose run --rm test-runner

To clean everything up:

docker-compose stop && docker-compose rm -f && docker-compose build

Build distributable files

npm run build

Start server

npm run dev

After this two steps, open http://localhost:8080 (8080 default express port in config.json.example) in your browser and delight our application.

Run all tests

npm test

Run unit tests

npm run test-unit

Run e2e tests

npm run test-e2e

Clean distributable files

npm run clean