An open API service indexing awesome lists of open source software.

https://github.com/trjohnst/nwn-server-status-http-server

Simple HTTP server to retrieve player counts from a Neverwinter Nights game server.
https://github.com/trjohnst/nwn-server-status-http-server

Last synced: 3 months ago
JSON representation

Simple HTTP server to retrieve player counts from a Neverwinter Nights game server.

Awesome Lists containing this project

README

        

# Overview

Simple HTTP server to retrieve player counts from a NWN 1 game server.

# Running locally

## Setup

First of all, you'll need to setup a file at `app/.env` that should look something like the following:

```
PORT=
NWN_PORT=
NWN_HOST=
```

## With NPM

```bash
cd app
npm i
npm run build
npm start
```

Then you can visit [localhost:8080/get-status](http://localhost:8080/get-status) to see status for your server discovered by this service.

## With Docker

The commands are captured in bash scripts in the commands folder. If you are on a system without bash, reference the `docker` cli commands in the files referenced. Otherwise, you can use the following to get up and running:

```bash
./commands/build.sh && ./commands/run.sh
```

Then you can visit [localhost:8080/get-status](http://localhost:8080/get-status) to see status for your server discovered by this service.

# Development

To develop with live reload on file changes, use the following commands:

```bash
cd app
npm i
npm start:dev
```

Then you can visit [localhost:8080/get-status](http://localhost:8080/get-status) to see status for your server discovered by this service.

It will not pick up on changes to the .env file.