johnpapa / johnpapa/lite-server

Multiple baseDir's to support multi-language app

Open
#141 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.3k
Forks
262
PR merge metrics
No merged PRs in 30d

Description

### 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/.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.