Giter Club home page Giter Club logo

helix-logs's Introduction

Helix Logs

A logger for the Helix roleplaying framework written in Node.js with Typescript.

If you enjoyed my project, consider adding a star โญ or checking out my server Aurora HL2RP, which has used this tool at scale and in production before its release.

demo

Features

  • Steam login
  • Usergroup whitelist
  • MySQL and SQLite support
  • Serverguard, SAM and ULX support
  • Search filters
    • Messages
    • Before and after dates
    • Steam ID's
    • Character ID's
    • Item ID's
  • HTTP and HTTPS support
  • Mobile friendly
  • Docker support

Requirements

Getting started

  • Clone the repository
git clone --depth=1 https://github.com/wildflowericecoffee/helix-logs.git <project_name>
  • Install dependencies
cd <project_name>
npm install
  • Configuration

Rename the .env.example file to .env and fill out the environment variables

Environment Variable Description
NODE_ENV (production/dev) Whether we are running in development or production. Enables error logger and sets the domain to localhost in dev.
SESSION_SECRET Secret used for keeping sessions. You should use a random generator for this.
WEBSITE_DOMAIN Your website's domain, used for redirecting to steam.
PORT The port your server listens on.
SSL (true/false) Whether you want the server to use HTTPS, you will need this if you have your SSL mode to full (strict) in cloudflare.
SSL_CERT, SSL_KEY The absolute path of your SSL certificate and key if you are using HTTPS. You can create these with openssl.
DATABASE (mysql/sqlite) What type of database you have.
SQLITE_PATH The path where your sv.db file is located for sqlite.
MYSQL_USER, MYSQL_PASS,
MYSQL_HOST, MYSQL_DB
Login credentials for mysql.
ADMIN_MOD (serverguard/sam/ulx) The admin mod your server uses, currently only Serverguard, SAM and ULX are supported.
STEAM_KEY Steam API key, get yours at https://steamcommunity.com/dev/apikey.
ALLOWED_RANKS List of allowed usergroups that can access the server logs, separated by semicolons.
  • Build and run the project
npm run build
npm start

Or, if you're using VS Code, you can use cmd + shift + b to run the default build task (which is mapped to npm run build), and then you can use the command palette (cmd + shift + p) and select Tasks: Run Task > npm: start to run npm start for you.

Note on editors! - TypeScript has great support in every editor, but this project has been pre-configured for use with VS Code.

Finally, navigate to http://localhost:3000 and you should see the template being served and rendered locally!

Deployment

To deploy the app to a web server, simply set it to production and add your own website domain.

IP addresses work too, but you should use a domain to be able to use Cloudflare's DDoS protection).

SSL is strongly recommended, you can combine Cloudflare's full (strict) HTTPS with a self signed certificate using openssl for full end-to-end encryption.

Docker for advanced users (Optional)

If you would like to use Docker, then create an .env file first like instructed above and then run the following command:

sudo docker-compose up -d

You'll be able to access the website by http://serveriphere:3000 or if you reverse proxy your domain to port 3000.

Debugging

Type npm run debug in your terminal to perform a full build and then server the app in watch mode. npm run watch if you are not using static assets.

VS Code lets you easily run npm scripts from the editor

i9G14KU 1

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.