Skip to content
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

Deployment details #19

Closed
rob42 opened this issue Jul 7, 2018 · 3 comments
Closed

Deployment details #19

rob42 opened this issue Jul 7, 2018 · 3 comments

Comments

@rob42
Copy link

rob42 commented Jul 7, 2018

Nice work, really like the project :-)
Ive been installing via signalk-java using the new artemis server.

  1. Install is fine (signalk-java does a git clone). Signalk-java then does an 'npm install', and 'npm build', I then needed a custom 'ng build' from the command line.

In the interests of auto-installs, it would be good if it all worked with std calls.

  1. In signalk-java apps are installed in signalk-static/{app-name}/, where signalk-static is the root of the web server, eg '/' Hence the app is expected to have an index.html in the root dir which launches the app when http//myserver:8080/Kip is executed.

In Kip I need to launch /Kip/public/index.html. Then it fails as the tag is '/'
So:
Please add an index.html in the root, which redirects to public/
Adjust to work as That may need some thought as Im not sure how other projects deploy?

@rob42
Copy link
Author

rob42 commented Jul 7, 2018

On retest the 'npm run build' called the 'ng build' so 1) above is closed.

@mxtommy
Copy link
Owner

mxtommy commented Jul 7, 2018

Adding an index that redirects wouldn't be that hard, however the more complicated thing would be setting Angular's "base-href" tag correctly. in this case I imagine it would need to be "/kip/public". You can set it with a custom build command (see https://github.com/mxtommy/Kip/blob/master/package.json#L21 for how I build it for NPM which the node server uses)

I'm not quite sure how I could automate that though. Angular environment expects you to build locally and deploy the built artifacts. With npm package for node server I build locally manually, and can set the href. (artifacts end up in /public) and node server serves from public.

I'm open to ideas if you have any! :)

@rob42
Copy link
Author

rob42 commented Jul 17, 2018

Ive have this working with a very simple mod.
Just copy /public/index.html to /index.html
edit base ref to "

It then starts correctly and works under signalk-java.

@mxtommy mxtommy closed this as completed Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants