Giter Site home page Giter Site logo

standalonerequestserver's Introduction

OpenKJ Standalone Request Server

Standalone basic single-venue request server implementation for use with OpenKJ.

This began as a fork of the freely-provided (thank you!) original OpenKJ StandaloneRequestServer, last updated Dec 21, 2018 (when I forked it in Jan 2023).

What's new

Enhancements & changes:

  • Single page for active search & song requests via modal
  • Search available at all times, even when requests are closed
  • Search queries sanitized more to reduce queries with excessive whitespace
  • new.css for a lightweight css base, dark mode enforced
  • htmx for active search & request modal
  • Fonts changed to my preferences, with a little extra CSS & JS as needed

Usage

I'll repeat what the original README said:

This is intended for people who already know how to configure and manage their own webservers and have a general familiarity with php. The easier and more feature rich option is to use the hosted service available at okjsongbook.com

Running Standalone Request Server

Requirements:

  • php
  • you can use php's built in web server, or a web server with php support caddy, nginx, apache
  • settings.inc should be edited with an appropriate database path that the webserver has write access to. If the database file doesn't exist, it will be created automatically.
  • You probably also want to change the $venueName in settings.inc to personalize your instance

Configuring OpenKJ

Under Tools > Settings > Network, you need to set the Server URL.

Example: If you were serving this from a web server as http://10.0.0.1/requestserver you would configure the server URL in OpenKJ to point to http://10.0.0.1/requestserver/api.php

NOTE: Standalone Request Server ignores any API key specified in the OpenKJ, so you can leave that blank.

Development

Docker

A docker compose file is provided for development. Your db dir (by default ./okjweb) must have group ownership set to www-data

Assets (js & css)

Because I like needlessly optimizing things, the css & js assets are optimized to css/style.min.css and js/script.min.js.

If you want to make changes, you have two options:

1. Use the un-optimized versions

You can modify the siteheader in global.inc to comment out the optimized asset tags and uncomment the un-optimized asset tags. Then just modify css/venuestyle.css to suit your style. (You probably don't need to modify js/script.js, and if you don't want to, you can keep using the optimized version in global.inc)

2. Use node tools

You can do an npm i in the project root to install the required node dependencies, and then run any of these:

  • npm run dev: starts watching both css/venuestyle.css & js/script.js for changes, rebuilding css/style.min.css & js/script.min.js as needed
  • npm run build: does a one-time production build of css/style.min.css & js/script.min.js
  • npm run watch_css: watch only css/venuestyle.css, rebuilding css/style.min.css as needed
  • npm run watch_js: watch only js/script.js, rebuilding js/script.min.js as needed
  • npm run build_css: does a one-time production build of css/style.min.css
  • npm run build_js: does a one-time production build of js/script.min.js

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.