New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
what was the reason behind client-backend? #5
Comments
@tonipepperoni The reason for this file is to keep the client_secret used in the authentication out of the client and the refresh token in an http-only cookie. |
@laqul Ok I see, so basically you are following: http://esbenp.github.io/2017/03/19/modern-rest-api-laravel-part-4/ Basically only auth related issues need to use the proxy, everything else doesn't require the proxy correct? In production an nginx configuration should pipe all /backend requests to the client-back end and all graphql requests to the api ? Am I correct? |
@tonipepperoni Hello! the proxy within the client is only needed in the development environment because by default the client runs on localhost:8080 and client-backend runs on localhost:8001. In a production environment run the quasar build (more info in Quasar Framework official site) command inside the client folder and a dist folder is created, the contents of this folder must be uploaded to the root server folder, then create a new folder in the server root folder called backend and put the index.php (client-backend) file in it. The laravel API can be placed on the same server in a subdomain or on another server. example server estructure: Sorry for my english. |
Ok got you. Thanks. I'll make a nginx conf and upload it here. Might also investigate build scripts to automate that process. will get back to you! |
Thanks! |
@tonipepperoni Did you get up and running with Nginx conf on this setup? About to dive into it myself |
@mandofever78 no, I didn't get around to it! Because basically i figured it was much better to write a login system that uses graphql. |
@tonipepperoni Thanks for the suggestion. I don't have enough time available at the moment, but help is appreciated. |
FYI - working Nginx config with SSL enabled for production deployment as described above with api located in subfolder of root:
|
Woudn't it be simply better to proxy a connection directly to laravel?
The text was updated successfully, but these errors were encountered: