How to develop my own web-based editor for spark?

Hello, I´m developing my own web-based editor and compiler for Spark. It is something similar to https://www.spark.io/build/ I think they are using ACE editor but I dont know how to program the compiler and burn it in the spark.

Any suggestion could help me?

2 Likes

Heya @1032429417,

Cool, sounds like a fun project! You can find examples of how to do cloud compiling, and flashing to your core here and here:

https://github.com/spark/spark-cli/blob/master/js/lib/ApiClient.js#L391
https://github.com/spark/spark-cli/blob/master/js/lib/ApiClient.js#L363

I hope that helps!

Thanks,
David

2 Likes

Thanks!!! That is very helpfully, I`m wondering if you know where I can find the file that help the ACE editor to recognize the SPARK language or is the same as Arduino Mode.

1 Like

Heya @1032429417,

You can safely use the Arduino syntax mode for the .ino files, and C++ syntax for the .h and .cpp files.

Thanks!
David

1 Like

Dear Dave I really appreciate your help, I did it succesfully to build my own compiler in a client pc, Now I`m facing a new challenge, I would to have my spark core in a different place and I would like to programming via Web. I know that javascript just run in a client part. Do you have any idea How could build a server part?