Friday 28 February 2020

ASK: How to build a simple runnable online editor?

Hi there,I am building an app that connects different data sources. I want to send data from one data source to another through API. But before I send it, I want to allow people to write a simple JS function that takes the data into that function and make changes and return a new/updated message. And this updated message will then be send to the other data source.So imagine I have a simple text area or a code-editor in my app and users will be able to write something like this where we are adding a property 'time'.function updateData(data) {data.time = new Date();return data;}​I want people to be able to 'deploy' this function and then test it. online live just like online editors do these days. How can I take the code in my code-editor in the front-end and deploy it and run it? Any pointers would be really appreciated!

Submitted February 28, 2020 at 01:04PM by rdv100

No comments:

Post a Comment