11 Commits

Author SHA1 Message Date
Trim21
2a0d29c1f5 style: add new rule for imports (#785) 2024-08-13 22:31:39 +00:00
Jesse Chan
477919856b server: create production build with webpack directly 2021-11-28 22:48:22 -08:00
Jesse Chan
5afa79b274 config.cli: migrate to TypeScript 2021-01-30 19:11:28 +08:00
Jesse Chan
f3ebdece95 server: use "/usr/share/flood/assets" as a location of assets 2021-01-19 10:40:08 +08:00
Jesse Chan
327a491af2 server: servedPath is a URL path not file path
Thus we shall not use path.join(). Or NodeJS will helpfully convert
the paths to Windows format if we are on Windows and as a result,
breaks everything.

Fixes: fee968525, 8f4fb88ac
2020-09-21 17:58:56 +08:00
Jesse Chan
80b8ad2cc5 server: use NCC to bundle server into a single file
This allows us to be dependency-free in production.

Caveats:

  - NCC can't handle WASM. Thus, we have to remove WASM files inside
    argon2-browser before build to force JS.

  - Duplicate geoip databases inside dist/data and dist. We have to
    remove dist/data after build.
2020-09-21 15:24:00 +08:00
Jesse Chan
13480c9bab server: initial support for TypeScript 2020-09-16 20:51:08 +08:00
Jesse Chan
8c04534102 shared: paths: remove unused variable "fs" 2020-08-26 17:35:20 +08:00
Jesse Chan
68b7b04773 flood: do not use current working path to retrieve assets 2020-08-25 19:34:03 +08:00
Jesse Chan
44b28a7a82 Move static assets to dist/ folder 2020-08-23 17:18:21 +08:00
Jesse Chan
656fd60b24 Enforce client, server isolation 2020-08-23 17:05:01 +08:00