lite-server icon indicating copy to clipboard operation
lite-server copied to clipboard

Multiple baseDir's to support multi-language app

Open MickL opened this issue 7 years ago • 0 comments

A descriptive title

An (aot) Angular application currently needs to build each language seperate:

dist/index.html // Detect language and redirect to /en or /de
dist/en/index.html // BaseDir app in english
dist/de/index.html // BaseDir app in german

So the desired functionality would be:

http://localhost:3000/ -> dist/index.html

http://localhost:3000/en -> dist/en/index.html
http://localhost:3000/en/some/fancy/route -> dist/en/index.html
http://localhost:3000/en/styles.css -> dist/en/styles.css

http://localhost:3000/de -> dist/de/index.html

But how to archieve this? Is it possible by use of a custom middleware? Or is this not possible with lite-server? Normally i would add a htaccess in dist/, dist/en/ and dist/de/.

MickL avatar Jun 22 '18 14:06 MickL