-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Running an express server from within cloud code #2993
Comments
Hi @mrnocreativity . I think you are looking to the same solution as I'm. |
Hi @ronaldo-getreveel, That looks exactly to be the solution, however, I hoped to be able to rely on the Parse Internals to do this by itself (like it did when the express server was hosted in the cloude code running on old parse.com). I guess this will be it then :) |
Have an express middleware function that grabs the x-parse-session-token header from the request. |
In Parse.com I have several apps that start an express server from within the cloud code. In those express routes, I can get to the request.user object upon every page request.
With the new setup for Parse Server, the express server runs fully independent from the Parse server and the Parse API is served as middleware from a endpoint in the express server. That removes the possibility to capture the request.user. So forcing 'logged in' sessions seems to no longer be possible from a simple webpage request.
I have been trying to move things around but I seem to be unable to make this work.
Is this no longer possible?
I just don't want to be dependent on client-side JS to make my app work. I'd like to use the Parse Server as my core backend and generate complete pages.
Am I overlooking a way of getting the request.user from an express request? Or am I doing something wrong when setting up cloud code from the parse server?
The text was updated successfully, but these errors were encountered: