Skip to content

Alt-Org/Altzone-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Altzone-Server

This is a REST API for the Altzone game. For more detailed API description and additional instructions see the wiki pages.

API versions

Production https://altzone.fi/api (prod branch) Latest release https://devapi.altzone.fi/latest-release (main branch) Dev https://devapi.altzone.fi (dev branch)

Swagger description

  1. Swagger on web
  2. Download latest swagger file version

Getting started

Install required software

  1. Install Node and npm, choose your platform and node version, which should be LTS here
  2. Install docker. Instructions can be found here
  3. Clone the API repo from GitHub https://github.com/Alt-Org/Altzone-Server.git
  4. Open a cloned repo in the IDE and install required dependencies with
    npm install

Start required services

  1. First, you need to set up the DB. So please run a script for it from the project root folder:

    For Windows (PowerShell):

     powershell -ExecutionPolicy Bypass -File .\init-db-on-windows.ps1

    For Linux (Bash):

     bash ./init-db-on-linux.sh
  2. Then start MongoDB, Redis and Mosquitto docker services (it will take couple minutes for the first time)

    docker compose up

Start the API

Start the API in dev (watch) mode by running the command in terminal

npm run start:dev

Above command will compile TS to JS and create a dist folder with compiled code. This folder should not be removed.

The API will be accessible on your machine on http://localhost:8080/

Stop API and DB

  1. Stop API by pressing Ctrl+C with focused terminal
  2. Stop DB and all other Docker services by pressing Ctrl+C (couple times to force) and run
    docker compose down

DB Schema

ERD

API architecture schema

architecture

About

Altzone mobile game REST API

Topics

Resources

Stars

Watchers

Forks

Contributors 11

Languages