Beefjeff
Beefjeff

Reputation: 399

phpdesktop - ajax request - resource not found

I am attempting to create a simple application with laravel and wrapping it in phpdesktop to use locally without the need of a webserver(aside from the built-in php server).

Everything works great except this one thing.

If I launch the app.exe, i get 404's when vue/axios requests data from an endpoint, eg: /api/resource.
However, If I open the app in a browser while running the php server (localhost:8000) the resource is found and loaded correctly.

Is there a way around this? Or is this simply how phpdesktop is supposed to work?

Here are a few relavant settings from 'settings.json'

"web_server": {
    "listen_on": ["127.0.0.1", 0],
    "www_directory": "www/public",
    "index_files": ["index.html", "index.php"],
    "cgi_interpreter": "php/php-cgi.exe",
    "cgi_extensions": ["php"],
    "cgi_temp_dir": "",
    "404_handler": "/index.php",
    "hide_files": []
},

Upvotes: 2

Views: 243

Answers (0)

Related Questions