Commit Graph

12 Commits

Author SHA1 Message Date
Jesse Chan
1a878d5423 flood: rearrange, remove misc files and reformat 2020-11-15 23:03:47 +08:00
Jesse Chan
b4690a628e server: enable strict routing to distinguish / at end
Frontend uses relative path and it breaks stuffs when a
frontend route is accessed with / at end.
2020-10-23 13:20:57 +08:00
Jesse Chan
49bc51952b server: auth: rate limits auth endpoints 2020-10-14 10:58:52 +08:00
Jesse Chan
cf08d68c92 auth, Users: initial preparation for multi client support
BREAKING CHANGE
2020-10-14 10:58:52 +08:00
Jesse Chan
f6896413a3 server: move auth APIs to /api/auth
Auth APIs are APIs too. Let's recognize it.
2020-10-10 12:42:27 +08:00
Jesse Chan
c6f8b9b76d AddTorrentByFile: use base64 instead of Blob to transfer file 2020-09-29 22:46:16 +08:00
Jesse Chan
43b2d8fbbf server: services: migrate to TypeScript 2020-09-27 22:27:14 +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
bb8cfb2745 server: remove dangling custom error page and defaults to prod 2020-09-21 15:27:08 +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
445c373c8f server: remove dangling "pug" views 2020-09-20 00:30:23 +08:00
Jesse Chan
901b5e0cc1 server: migrate app and some utils to TS
Also switch to TS transpile-only mode for build.
2020-09-17 19:56:05 +08:00