0

I need to know how is the best way to solve the problem below:

I have an online editor, where the user write a js code to solve some problem, like a challenge. So, I need to get this code, and proccess it in a server, to check if the code was written correctly, comparing the results.

Do I need to call a js shell in server side or something like this?

asked Apr 11, 2013 at 17:50

2 Answers 2

1

Running any code written by the user on your server would be a great security issue.

Instead, run the code on the client with eval(). Then send the result (like if the user solved it) to your server.

answered Apr 11, 2013 at 18:21
Sign up to request clarification or add additional context in comments.

Comments

0

Google for JavaScript interpreter, there are quite a few.

answered Apr 11, 2013 at 18:25

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.