-
Notifications
You must be signed in to change notification settings - Fork 1
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
problem deploying projects #2
Comments
hi, i change default hostname and port to request headers. Redirect correctly now:
|
I am afraid this does not work for me as req.headers.origin is undefined if for instance using Firefox 47.0.1 and therefor urlParse.parse throws an error and the server crashes. If I use
everything works fine running standallone and i even can access already saved projects once I switch back to running embedded. But I cannot save anything (node or project) running embedded. Allthough hitting deploy brings "Sucessfully deployed", once I reload the page in the Browser the changes are gone. I guess there is still something wrong with the path parameter as I can put in there what I want as long as its starts with a Slash without creating any error neither on the console nor in the Browser. As in my embedded configuration httpAdmin is served from :/red I also tried setting path to '/red/flows' to no avail. thanks for any suggestions |
Analysing some more I think the issue not being able to save is an authentication problem. In my tests I had no authentication set when running stand-alone versus adminAuth settings when running embeded. When I turn on the same authentication in stand-alone mode things fail the same way and when I try to directly access |
I'm sorry, not test in mozilla and ie, you are right,param req.headers.origin alone in chrome, no exists in mozilla and ie, though param host exist in three navigator:
The auth had not comtemplated now, the app i'm developing still have not gotten to the part of authorization, but i have already taken advantage of to make:
as middleware(express) permission in red/api/auth/index.js function needsPermisssion needs request.headers.authorization inject authorization of the new request to /flows. I have corrected the redirect and authorization to record the flows, version 0.0.2-13. Thank you for helping me and catch these bugs. |
You're welcome! Latest fix works well in a fresh instance (one without any existing tabs or nodes) both stand-alone and embeded - only thing I had to do was to change path to If however I install the module on my existing instance with two tabs and over a hundred nodes in the flows and subflows it messes up big time mixing up projects with existing tabs. anyway nice work so far - please let me know if you need some more information or testing. |
just tested
and works fine for me see #3 |
Correctly:
as httpAdminRoot defualt "/" so that path="//flows" not working apirest. I also corrected response of "flows" when there are error redirect to client:
note: install for npm use node-red-contrib-multiproject@version, npm not install version corretly. I have to see why.
how to save flows in instance(file/mysql/mongo....)? |
I allway install using npm Latest fix works fine for me - so you might as well consider closing this issue. As for getting my existing flows into a project I tried exporting and then re-importing it into a project and thereby ran into issue #4. |
If you are not running Node-Red stand alone on standard port 1880, but (as in my case) embedded in an existing express app on a different port (8080) then the server crashes when trying to deploy a project.
There is a section of code in multiproject.js starting at line 132 where host, port, and path are hard-coded.
Changing only the port to 8080 gets rid of the crashes but still deploying a project dosen't seem to save it as i get the following error once I select it afterwards:
The text was updated successfully, but these errors were encountered: