replit / ReplitClient.js

A JavaScript client library used to connect to the server-side code execution service
69 stars 13 forks source link

How do i declare the token ? #5

Open kuro0ni opened 8 years ago

kuro0ni commented 8 years ago

I followed the documentation and to create a Replit object i need to pass a token. And for the token there are two attributes time_created and mag_mac. What should i do to get values for those two attributes ? ps: I am using this library on an asp.net mvc project

amasad commented 8 years ago

There should be a Nodejs program on the docs that generates the token, port it to ASP

kuro0ni commented 8 years ago

Thank you for your reply i managed to do that. Anyways i want to pass command line arguments to my cpp code but it does not work.

repl.evaluateOnce( code, { stdin: 'argument1', stdout: function (output) { console.log(output); }
}).then( function success(result) { if (result.error) { console.log('Error : ', result.error); } else { console.log('Result : ', result.data); } }, function error(error) { console.error('Error connecting to repl.it'); } );

i passed the argument1 string as stdin but it didnt work. Where did i went wrong ?