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

Spawing the server in VSCode debugger does not work #16

Open
pke opened this issue Oct 13, 2019 · 3 comments
Open

Spawing the server in VSCode debugger does not work #16

pke opened this issue Oct 13, 2019 · 3 comments

Comments

@pke
Copy link

pke commented Oct 13, 2019

On Windows I am trying to open the server inside a VSCode debugger session and while the server is in the path and is spawned, the output stream handler is called only once with an empty buffer and then the whole node process is terminated.
No other redis server is running at that time.

redis-server 1.2.2

//index.js
const RedisServer = require("redis-server")

// Simply pass the port that you want a Redis server to listen on.
const server = new RedisServer({
  bin: "c:/redis/redis-server.exe",
  port: 5555
});

async function main() {
  await server.open() // <-- this line causes the process to exit
  await server.close()
}

main()

package.json

{
  "name": "redis-server-test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "redis-server": "1.2.2"
  }
}
@BrandonZacharie
Copy link
Owner

This library hasn't been developed for or tested on Windows. I'd be more than happy to review a PR from anyone with time and access to a Windows machine.

@pke
Copy link
Author

pke commented Oct 26, 2019

I'll see if I can investigate something. The code looks pretty straight forward, I would not know why it could fail in the first place.

@pke
Copy link
Author

pke commented Oct 26, 2019

Fixed in #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants