Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making web socket port configurable inside ranvier.json #384

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Error logs**
If the server produced an error paste the log here

**Environment (please complete the following information):**
- OS: [e.g. Ubuntu 16.04]
- Node version

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion bundles/ranvier-websocket/server-events/wss.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = srcPath => {
listeners: {
startup: state => function (commander) {
// create a new websocket server using the port command line argument
const wss = new WebSocket.Server({ port: 4001 });
const wss = new WebSocket.Server({ port: `${commander.wsPort}` });

// This creates a super basic "echo" websocket server
wss.on('connection', function connection(ws) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ranvier
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ commander
.option('-s, --save [time]', 'Number of seconds between auto-save ticks [10]', 10)
.option('-r, --respawn [time]', 'Number of minutes between respawn ticks [120]', 120)
.option('-p, --port [portNumber]', 'Port to host the server [23]', Config.get('port', 23))
.option('-w, --wsPort [portNumber]', 'Web socket port [4001]', Config.get('wsPort', 4001))
.option('-v, --verbose', 'Verbose console logging.', true)
.option('-e, --prettyErrors', 'Pretty-print formatting for error stack traces.', false)
.parse(process.argv);
Expand Down
1 change: 1 addition & 0 deletions ranvier.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"port": 4000,
"wsPort": 4001,
"bundles": [
"ranvier-telnet",
"ranvier-websocket",
Expand Down
2 changes: 1 addition & 1 deletion src/Room.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class Room extends Metadatable(EventEmitter) {
for (let [behaviorName, config] of this.behaviors) {
let behavior = state.RoomBehaviorManager.get(behaviorName);
if (!behavior) {
Logger.warn(`No script found for item behavior ${behaviorName}`);
Logger.warn(`No script found for room behavior ${behaviorName}`);
continue;
}

Expand Down