https://github.com/mcpt/event-server
Partial implementation of the DMOJ event server
https://github.com/mcpt/event-server
Last synced: 11 months ago
JSON representation
Partial implementation of the DMOJ event server
- Host: GitHub
- URL: https://github.com/mcpt/event-server
- Owner: mcpt
- License: mit
- Created: 2021-04-04T00:00:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-04T00:17:01.000Z (almost 5 years ago)
- Last Synced: 2025-01-10T03:26:49.098Z (12 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Event Server
This is a partial implementation of the WebSockets [event server](https://github.com/DMOJ/online-judge/blob/master/websocket/daemon.js) created by DMOJ. Unlike the original, it does not support slow polling and only accepts WebSockets connections.
## Install
To install, clone the repository and run `npm i`.
```
git clone https://github.com/mcpt/event-server.git
cd event-server
npm i
```
## Configure
Follow the [DMOJ docs](https://docs.dmoj.ca/#/site/installation?id=configuration-of-event-server), but instead of using the one provided in the `websockets` directory, use this instead.
The configuration (`config.js`) should look something like:
```js
module.exports = {
subscriber: {
host: '127.0.0.1',
port: 15100
},
publisher: {
host: '127.0.0.1',
port: 15101
}
}
```
The subscriber should match the nginx settings, while the publisher should match `EVENT_DAEMON_POST` in `local_settings.py`