Ezhil-Lang icon indicating copy to clipboard operation
Ezhil-Lang copied to clipboard

Use Learn2Code Chrome plugin to run Ezhil on localhost

Open arcturusannamalai opened this issue 9 years ago • 9 comments

Use Learn2Code Chrome plugin to run Ezhil on localhost (Ref: https://github.com/sridhar87/Learn2Code/ )

  1. Start Ezhil server - EZWeb.py - on localhost
  2. Point the Learn2Code plugin in your Chrome browser to the localhost

arcturusannamalai avatar Nov 24 '15 03:11 arcturusannamalai

I am interested to help with this. Learn2code plugin uses hackerrank to compile the source code, integrating may require permission and code changes to upstream. So I propose two solutions.

  • Host a production server in heroku or VPS and use it as default source to run the program.
  • Provide an option in chrome plugin to override server url for compilation. Developer can use the localhost here.

Previously I have done similar to stuff to use Python offline using empythoned.

If some students are interested to work on this, I will be glad to take back step. Please let me know your thoughts.

kracekumar avatar Nov 24 '15 18:11 kracekumar

@kracekumar - Thanks for your interest and detailed comments; before we begin any technical comments, can you please confirm you are able to run the local web server from Ezhil-Lang repository?

$ cd ezhil-lang && ./webserver.sh

The point your browser to http://localhost:8080/

This is where I see the application for the chrome/mozilla plugin should post its data and receive its output from.

arcturusannamalai avatar Nov 25 '15 05:11 arcturusannamalai

Yes, I am able to run the web server and execute the program.

kracekumar avatar Nov 25 '15 05:11 kracekumar

@kracekumar - Thanks for checking. So does this issue/ticket make sense in the context of this existing web-service ? I'm really looking for a nice interface via Chrome or Firefox, and suitable additions to webservice - JSON capability etc.

arcturusannamalai avatar Nov 25 '15 06:11 arcturusannamalai

@arcturusannamalai Quick look at the source reveals alteration in API with JSON support. I can do that as first step, before start writing code, I will dig more into the code and list down bunch of changes required. is that fine ?

I will be glad to change the home screen with bootstrap is that fine ?

kracekumar avatar Nov 25 '15 06:11 kracekumar

Please go ahead! Thanks.

arcturusannamalai avatar Nov 26 '15 22:11 arcturusannamalai

The web server uses inbuilt SimpleHTTPServer and has boilerplate code which can be simplifed by using Flask ?

  1. Create api only service which handles json request with Flask in port 5000.
  2. Extend api service to handle existing functionality of EZWeb.py and use port 8080.
  3. Write chrome extension which uses new json service.

kracekumar avatar Nov 29 '15 18:11 kracekumar

Nice breakdown of tasks @kracekumar

I already have some Django code under koodam which is deployed at ezhillang.org

While I prefer we stick with Django you may use Flask, if you are not familiar with the Django framework.

arcturusannamalai avatar Nov 30 '15 02:11 arcturusannamalai

I am super familiar with Django. I will use that. Thanks @arcturusannamalai

kracekumar avatar Nov 30 '15 08:11 kracekumar