Setup dev environment for nethserver-cockpit

(David) #1

So what I did is, I followed these instructions.

After a few fixes, the build passes now, but when I open the page, I see this:

Looks to me like a misconfiguration of webpack, any ideas?

(Michael Träumner) #2

I think we should ask the @dev_team?

(Edoardo Spadoni) #3

Have you sync your local repo to the nethserver machine? because it seems that localhost:8080 is a local address not the nethserver’s machine address.

Do you have started npm locally?

(David) #4

Ciao Edoardo, thanks for helping!
No, I have not synced anything. I expected the ui to run in my dev environment locally and then there is maybe a config file to point it to a specific server…

(Edoardo Spadoni) #5

Maybe in the docs this point is not very clear :thinking:, thanks for the report we can add a warning to specify that the ui must be builded and synced before starting to visualize the results.

We have to follow this workflow because Cockpit not works very well if the requests arrive from localhost or domains different from the machine.

Months ago, when we start to develop the core part this behavior was the first blocking step.

(Giacomo Sanchietti) #6

Thank you for pointing it out, I’ve just added a note to the doc:

(David) #7

ok so do i understand correctly, that there is no use for the npm run dev command at the moment. We rather do a production build and sync it to the server. I suggest to remove the command from the dev documentation and make very clear how the procedure is, because it’s a rather special one… :slightly_smiling_face:

(David) #8