mirror of
https://github.com/Kadigan/atlas-dedicated-server.git
synced 2024-08-30 17:32:14 +00:00
Updated to include the executable
This commit is contained in:
parent
0df481e70d
commit
7ed1daaa15
@ -2,15 +2,22 @@
|
|||||||
|
|
||||||
The atlas.js node.js server is intended to do one thing - serve your `MapImg`, `CellImg_` and `/n/n/n.png` files over HTTP. It is written for this single purpose, and will serve no other files.
|
The atlas.js node.js server is intended to do one thing - serve your `MapImg`, `CellImg_` and `/n/n/n.png` files over HTTP. It is written for this single purpose, and will serve no other files.
|
||||||
|
|
||||||
This server obviously requires you have **node.js** installed on your system. You will also require the `node_modules` included here in a .zip file for your convenience.
|
An executable version (Windows x64 exe) has been provided for your convenience as `atlas-simple-http-server.zip`.
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
Please remember to edit `ServerWWWPort` and `ATLAS_ServerGrid_Folder` to your liking, and remember to *port-forward* the chosen port to your public IP.
|
Please remember to edit `localPort` and `serverGridFolder` to your liking, and remember to *port-forward* the chosen port to your public IP.
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
Run the server via `node atlas.js`
|
Run the server either via `node atlas.js` or by launching `atlas-simple-http-server.exe`.
|
||||||
|
|
||||||
### Debugging
|
### Debugging
|
||||||
`atlas.js` outputs full headers received and the raw request. Use these to debug what the Game server is trying to do and failing.
|
The simple HTTP server outputs full headers received and the raw request. Use these to debug what the Game server is trying (and failing) to do.
|
||||||
|
|
||||||
If you're getting repeated requests for the same file, **make sure your `SeamlessDataPort` is port-fordwarded and included in your starter cmd**. Once that is done, the server should stop making a fool of itself. ;]
|
If you're getting repeated requests for the same file, **make sure your `SeamlessDataPort` is port-fordwarded and included in your starter cmd**. Once that is done, the server should stop making a fool of itself. ;]
|
||||||
|
|
||||||
|
### Required packages
|
||||||
|
|
||||||
|
- [fs]
|
||||||
|
- [http]
|
||||||
|
- [url]
|
||||||
|
- [nconf]
|
||||||
|
Binary file not shown.
@ -1,20 +1,18 @@
|
|||||||
/* ---------------------------------
|
|
||||||
* ATLAS local HTTP server for serving map-related images
|
|
||||||
*
|
|
||||||
* Version: 1.0
|
|
||||||
* Last change: 2018-12-29
|
|
||||||
* Author: Kad, kadigan.ksb@gmail.com
|
|
||||||
* License: GPL v3.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
// CONFIG:
|
// CONFIG:
|
||||||
|
var nconf = require('nconf');
|
||||||
|
nconf.argv().env();
|
||||||
|
nconf.file({ file: 'config.json' });
|
||||||
|
|
||||||
// on what port should the server be listening to? (you will need to forward this port, it's TCP)
|
// default config values:
|
||||||
// NOTE: you only need ONE map server for your entire ATLAS World
|
nconf.defaults({
|
||||||
var ServerWWWPort = 10000;
|
"serverGridFolder": "./ServerGrid",
|
||||||
|
"localport": 10000
|
||||||
|
});
|
||||||
|
|
||||||
|
var ServerWWWPort = nconf.get('localport');
|
||||||
|
|
||||||
// where do you keep the images on disk? (note: replace all \ with / or it won't work!)
|
// where do you keep the images on disk? (note: replace all \ with / or it won't work!)
|
||||||
var ATLAS_ServerGrid_Folder = 'd:/STEAM/steamapps/common/ATLAS Dedicated Server/ShooterGame/ServerGrid';
|
var ATLAS_ServerGrid_Folder = nconf.get('serverGridFolder');
|
||||||
|
|
||||||
// =====================================================================================================
|
// =====================================================================================================
|
||||||
// import requirements
|
// import requirements
|
||||||
@ -88,7 +86,7 @@ var server = http.createServer (function handler (request, response) {
|
|||||||
var fileData = fs.readFileSync(ATLAS_ServerGrid_Folder + 'CellImg_' + CellImg.join('-') + '.png');
|
var fileData = fs.readFileSync(ATLAS_ServerGrid_Folder + 'CellImg_' + CellImg.join('-') + '.png');
|
||||||
response.writeHead(200, new defaultResponse('image/jpg', fileData.length));
|
response.writeHead(200, new defaultResponse('image/jpg', fileData.length));
|
||||||
response.write(fileData);
|
response.write(fileData);
|
||||||
response.end();
|
response.end();D
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(" ERROR: CellImg_" + CellImg.join('-') + ".jpg not found in " + ATLAS_ServerGrid_Folder + ", cannot serve. Aborting.");
|
console.log(" ERROR: CellImg_" + CellImg.join('-') + ".jpg not found in " + ATLAS_ServerGrid_Folder + ", cannot serve. Aborting.");
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"localPort": 10000,
|
||||||
|
"serverGridFolder": "d:/STEAM/steamapps/common/ATLAS Dedicated Server/ShooterGame/ServerGrid"
|
||||||
|
}
|
Binary file not shown.
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"name": "atlas-http-server",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "ATLAS HTTP server for your ATLAS MMO dedicated server - when you just can't get the maps to show no matter what",
|
||||||
|
"main": "atlas.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "Kadigan ks/b/ <kadigan.ksb@gmail.com>",
|
||||||
|
"license": "GPL-3.0",
|
||||||
|
"dependencies": {
|
||||||
|
"fs": "0.0.1-security",
|
||||||
|
"http": "0.0.0",
|
||||||
|
"nconf": "^0.10.0",
|
||||||
|
"url": "^0.11.0"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user