wakanda

How to serve static files in Wakanda v2


I've been using Wakanda v2 server for a few months now. I'm using Angular (v2+ not angularJS) for the front end.

I finally got to the point where I want to publish my Angular app through Wakanda. (I suppose I could just as easily use Apache but Wakanda has a web server so why not use it?)

The problem is I don't know how to publish the app with Wakanda. I tried putting the 'dist' files in the web folder but Wakanda keeps saying "Service Not Available".

Any thoughts would be much appreciated.


Solution

  • This feature is under hard work and schedule for the v2.2 release. In the meantime, you can do these steps manually:

    You can have issue with the angular URL strategy. The # angular is not understood by Wakanda Server. Therefor, you can add useHash: true in the /src/app/app.module.ts.

    RouterModule.forRoot(routes, { useHash: true })

    Source: https://github.com/Wakanda/wakanda-issues/issues/137