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

Is any additional Setup needed to run JS Tutor? #1

Closed
arikrak opened this issue Mar 9, 2014 · 6 comments
Closed

Is any additional Setup needed to run JS Tutor? #1

arikrak opened this issue Mar 9, 2014 · 6 comments

Comments

@arikrak
Copy link

arikrak commented Mar 9, 2014

I installed this code on Amazon EC2 (along with Node and NPM) and opened port 5858 and 8080. I ran node server.js and got the following terminal message:

8080
blah blah

I then visited mysite:8080 which loaded normally. However, when I click on "Visualize Execution" nothing happens in the browser. The terminal displays a message [SourceExecution] : StdErr Debugger listening on port 6060.

Opening up port 6060 doesn't solve the problem. When I close the server in the terminal, I get a message in the browser "Server error (possibly due to memory/resource overload)..."

Is any additional setup needed to get the Javascript Debugger to work?

@hdoan741
Copy link
Owner

Hey! I used to have problem deploying on Amazon as well :-( It was because the debugger took sometimes to initialize before it can be used, but the code may send messages to it earlier than that -- and caused it to fail. I tried but I couldn't solve it completely.

Have you tried to deploy locally? Does it work locally?

@arikrak
Copy link
Author

arikrak commented Mar 11, 2014

Yes, it works locally. Weird, I thought EC2 was just like any Linux instance. What server does it work it on? Thanks!

@hdoan741
Copy link
Owner

I'm not sure. Maybe you could try deploying on Heroku (although I believe
they use EC2 to back their service)? When I worked on it, I did have it
working on both EC2 and Heroku.

But I'm not maintaining this project any more. Sorry. You are free to use
the source code though..

On Mon, Mar 10, 2014 at 8:31 PM, Ariel notifications@github.com wrote:

Yes, it works locally. Weird, I thought EC2 was just like any Linux
instance. What server does it work it on? Thanks!

Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-37260210
.

@arikrak
Copy link
Author

arikrak commented Mar 13, 2014

Yes, it works on Heroku and was much easier to setup! I just had to change the package.json file to "node": "v0.8.x", from 0.8.6.

@arikrak arikrak closed this as completed Mar 13, 2014
@arikrak
Copy link
Author

arikrak commented Mar 13, 2014

Last question - how does it capture console.log() output? I want to change it to capture print(). Thanks.

@hdoan741
Copy link
Owner

It listens to changes in user program's output stream. It's not just console.log() but anything that is written to the output stream will be captured:

https://github.com/manhhung741/jstutor/blob/master/SourceExecution.js

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

No branches or pull requests

2 participants