Files
habitica/website/server/libs/client.js
Phillip Thelen cdf8556fd6 Improve performance in production setup (#15594)
* build cached content files for mobile during gulp build

* load already cached content files during startup

* add option for mongoose to define minPoolSize

* cache client index.html for 10 minutes. Improves initial load times

* add option to auth to use lean version of user doc

* add a way to produce a heapdump from the command line

* fix lint
2026-01-26 11:45:44 -06:00

8 lines
277 B
JavaScript

const ROOT = `${__dirname}/../../../`;
const TEN_MINUTES = 1000 * 60 * 10;
export function serveClient (expressRes) { // eslint-disable-line import/prefer-default-export
return expressRes.sendFile('./website/client/dist/index.html', { root: ROOT, maxAge: TEN_MINUTES });
}