Giter Site home page Giter Site logo

skoivumaki / altzone-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alt-org/altzone-server

0.0 0.0 0.0 136.89 MB

REST API

Shell 0.14% JavaScript 0.11% C# 2.92% TypeScript 91.54% CSS 0.52% HTML 1.39% Batchfile 0.16% Dockerfile 3.22%

altzone-server's Introduction

Altzone-Server

This is a REST API for Altzone game

Link to server

Server is now available on https://altzone.fi/

Server description is here https://altzone.fi/swagger

Getting started

Docker compose

  1. Install docker Windows | Linux
  2. Start docker (by default it starts automatically, you can test whenever it is installed by running docker version)
  3. In the terminal run: npm install
  4. Run tsc -w (this command will recompile project after changes)
  5. Run docker compose up (this will start the actual API in dev mode(=will restart API each time you make changes to files in the /src folder))
  6. Stop the API by pressing CTRL+C and docker compose down

Directly on PC

Install software to run the API

  1. You have to install Node.js version 18 to your computer. The installation process is similar to installing a regular program. You may download it here: https://nodejs.org/en/download. For Windows choose the LTS .msi 64-bit version.
  2. Install MongoDB Community Server: https://www.mongodb.com/try/download/community
  3. After that go to the folder where you have saved the project and run npm install in the terminal

Create a .env file

Create .env file in the root directory.

Here is example .env content:

HOST=localhost
PORT=8080
MONGO_URL=mongodb://127.0.0.1
MONGO_PORT=27017
MONGO_DB_NAME=altzone

Start API

In order to start the API, you need to run the following commands in the terminal(project root repository):

  1. tsc -w
  2. npm run dev or node dist/index.js

The API will start at http://localhost:8080 by default.

Do not forget to terminate processes in the end (both tsc and node) by pressing Ctrl+C in terminal.

API Schema

ERD

altzone-server's People

Contributors

mikhailderiabin avatar ruupin avatar jpetays avatar leolabdev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.