Skip to content

Commit

Permalink
Updated nodejs server
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon committed Aug 17, 2024
1 parent 38ca6fc commit 67e4bb8
Show file tree
Hide file tree
Showing 3,113 changed files with 14,042 additions and 5 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion GuildWarsPartySearch.Bot/Dependencies/Headquarter
3 changes: 3 additions & 0 deletions GuildWarsPartySearch.NodeJSServer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./node_modules
dist/*
./config.json
9 changes: 9 additions & 0 deletions GuildWarsPartySearch.NodeJSServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM alpine:3.20

WORKDIR /app

RUN apk update && apk add bash nodejs npm && npm install

EXPOSE 80

CMD ["sh", "-c", "while :; do sleep 2073600; done"]
14 changes: 14 additions & 0 deletions GuildWarsPartySearch.NodeJSServer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# GuildWarsPartySearch.Bot

## Running the docker container

1. Copy config.example.sh to config.sh, and edit it to add your Guild Wars credentials
2. `docker build -t partysearchserver_alpine .`
3. *Windows:* `docker run -d --restart always --name partysearchserver -p80:80 -v "%cd%":/app partysearchserver_alpine ./run.sh`
3. *Linux:* `docker run -d --restart always --name "${PWD##*/}" -p80:80 --replace -v "$PWD":/app:Z partysearchserver_alpine ./run.sh`

## If the source code for the bot has been changed

1. `docker stop "${PWD##*/}"`
2. `rm -R linuxbuild`
3. `docker start "${PWD##*/}"`
5 changes: 5 additions & 0 deletions GuildWarsPartySearch.NodeJSServer/config.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"whitelisted_ips": ["127.0.0.1"],
"blacklisted_ips": [],
"bot_api_keys": ["development"]
}
109 changes: 109 additions & 0 deletions GuildWarsPartySearch.NodeJSServer/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Guild Wars Party Search</title>

<meta charset="UTF-8" />
<meta name="description" content="Guild Wars Party Search" />
<meta name="keywords" content="guild wars, gw, gw1, map, tyria, kryta, elona, ascalon, that_shaman, that shaman, shaman, guildwarspartysearch, gwdevhub" />

<link rel="icon" type="image/png" href="src/resources/icons/guildhall.png">

<link href="index.scss" rel="stylesheet" />
</head>
<body>
<div id="menu_button">
<div class="toggleElement cursor-pointer" data-selector="#menu"><img src="src/resources/hamburger.png" /></div>
</div>
<div id="menu" class="hidden">
<div class="menuHeader">Locations</div>
<div class="maplist">
<div class="mapLink cursor-pointer" data-id="0">Ascalon (Pre-searing)</div>
<div class="mapLink cursor-pointer" data-id="1">Tyria</div>
<div class="mapLink cursor-pointer" data-id="2">Cantha</div>
<div class="mapLink cursor-pointer" data-id="3">Elona</div>
<div class="mapLink cursor-pointer" data-id="4">The Battle Isles</div>
<div class="mapLink cursor-pointer" data-id="5">Realm of Torment</div>
</div>
<div class="menuHeader">Parties</div>
<div class="partyList">
</div>
<div class="legal">
<p>
Guild Wars Party Search tool by <a href="https://opencollective.com/gwdevhub_collective" target="_blank">gwdevhub</a>
</p>
<p>
<a href="https://www.guildwars.com" target="_blank">Guild Wars</a> Interactive map by <a href="https://www.thatshaman.com" target="_blank">that_shaman</a>
</p>
<p>
NCSOFT, the interlocking NC logo, ArenaNet, Guild Wars, Guild Wars Factions, Guild Wars Nightfall, Guild Wars: Eye of the North, Guild Wars 2, and all associated logos and designs are trademarks or registered trademarks of NCSOFT Corporation. All other trademarks are the property of their respective owners.
</p>
</div>
</div>
<div id="mapdiv" class="zoomed" style="width: 100vw; height: 100vh; background-color: #ffffff;"></div>
<div id="partyWindow" class="popupWindow hidden">
<div class="popupHeader">
<div id="partyWindowTitle" class="popupWindowTitle divider">Party Search</div>
<div class="closeButton toggleElement cursor-pointer" data-selector="#partyWindow">x</div>
<div class="d-flex">
<div>
<input type="checkbox" id="search_type_toggle_0" class="search_type_toggle" data-id="0"/>
<label for="search_type_toggle_0">Hunting</label>
</div>
<div>
<input type="checkbox" id="search_type_toggle_1" class="search_type_toggle" data-id="1"/>
<label for="search_type_toggle_1">Mission</label>
</div>
<div>
<input type="checkbox" id="search_type_toggle_2" class="search_type_toggle" data-id="2"/>
<label for="search_type_toggle_2">Quest</label>
</div>
<div>
<input type="checkbox" id="search_type_toggle_3" class="search_type_toggle" data-id="3"/>
<label for="search_type_toggle_3">Trade</label>
</div>
<div>
<input type="checkbox" id="search_type_toggle_4" class="search_type_toggle" data-id="4"/>
<label for="search_type_toggle_4">Guild</label>
</div>
</div>
<table id="partyWindowTableHeader" class="table">
<thead>
<tr class="row">
<th class="header text-start">Party Leader</th>
<th class="header">Region</th>
<th class="header">Size</th>
<th class="header">District</th>
<th class="header text-start">Description</th>
</tr>
</thead>
</table>
</div>
<table id="partyWindowTable" class="table">
<tbody>
<tr class="divider row" id="search_type_divider_0">
<th colspan="5">Mission</th>
</tr>
<tr class="divider row" id="search_type_divider_1">
<th colspan="5">Quest</th>
</tr>
<tr class="divider row" id="search_type_divider_2">
<th colspan="5">Hunting</th>
</tr>
<tr class="divider row" id="search_type_divider_3">
<th colspan="5">Guild</th>
</tr>
<tr class="divider row" id="search_type_divider_4">
<th colspan="5">Trade</th>
</tr>
<tr class="divider" id="endRow">
</tr>
</tbody>
</table>
</div>
<script src="index.mjs" type="module"></script>
</body>
</html>
Loading

0 comments on commit 67e4bb8

Please sign in to comment.