Open nricciardi opened 1 year ago
You can overwrite the "allowed extensions" for eel's start args to not include *.js, it should then skip them when trying to parse for eel-exposed functions.
I'd agree though that this often leads to a sluggish start-up, and ultimately implementing some sort of caching for the parsed results might be a nice feature.
Thank you, now open is almost instantly.
Anyway I see that when I click refresh page the server response with a 404 page not found.
I develop my app using Angular, for example, refreshing /home
server return 404, but that route is in route module... (normally it works)
Furthermore also window.close()
doesn't work, but I think it is an Angular problem...
Not sure with the routing issue, that would likely need a bit of more detailed troubleshooting while it's running (you can try and get the Bottle instance and inspect the requests to find out more).
The window.close()
thing might again be related to the browser-end. Most browsers (including Chrome) nowadays don't allow modifying the window (size, position and close attributes) unless they've been created from within a JavaScript context with those specific permissions. I might be wrong, but I think if you launch Chrome in app-mode it does allow setting most of these, so if you're not using app mode right now you could try that...
How can I use Bottle instance in my app?
However, for example, when I'm in logic route /home
in chrome
mode and refresh the page I see
GET http://localhost:8000/home 404 (Not Found)
, but if I navigate to http://localhost:8000/
(my Angular frontend base url), i can see my app again.
I think it needs something like an .htaccess file to redirect all calls to /
, is it possible?
window.close issue Using "chrome-app" it doesn't work yet. Furthermore, using that Eel isn't loaded correctly... I use the following code in index.html of my angular frontend to load Eel:
eel.set_host('http://127.0.0.1:8000');
eel._init(); // re-initialized eel settings
Thanks for answers!
EDIT If you feel like you can try my project directly, it's an opensource university project, so don't have too many expectations from me. Taskup
EDIT 2 I have found a possible solution in a old issue never closed: Angular Route/URL error after refresh #655
However, I would like to better investigate other possibilities to avoid that unpleasant #
I'm building an app using this library and Angular as a front end, but I'm having problems running it. In particular, I notice a considerable slowness in executing the
eel.init()
instruction, even up to 20 seconds.This is the size of the files that are inside the folder I'm trying to upload:
Why? How fix it?
EDIT:
Looking through the code I think the problem is that the library tries to parse all the files looking for JS functions to expose.
By not exposing JS-side functions, but calling only Python functions, is there any way to prevent such file parsing?