mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00
Use production mode (#904)
* Set NODE_ENV to production * Disable the X-Powered-By HTTP header * Explain what the different values do * Add changelog file
This commit is contained in:
parent
6c6cd6ee92
commit
9a6d4317b2
@ -45,6 +45,8 @@ COPY --from=builder /src/lib ./
|
||||
COPY --from=builder /src/public ./public
|
||||
COPY --from=builder /src/assets ./assets
|
||||
|
||||
ENV NODE_ENV="production"
|
||||
|
||||
VOLUME /data
|
||||
EXPOSE 9993
|
||||
EXPOSE 7775
|
||||
|
1
changelog.d/904.misc
Normal file
1
changelog.d/904.misc
Normal file
@ -0,0 +1 @@
|
||||
Switch expressjs to production mode for improved performance.
|
@ -27,7 +27,12 @@ cd matrix-hookshot
|
||||
yarn # or npm i
|
||||
```
|
||||
|
||||
Starting the bridge (after configuring it), is a matter of running `yarn start`.
|
||||
Starting the bridge (after configuring it), is a matter of setting the `NODE_ENV` environment variable to `production` or `development`, depending if you want [better performance or more verbose logging](https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production), and then running it:
|
||||
|
||||
|
||||
```bash
|
||||
NODE_ENV=production yarn start
|
||||
```
|
||||
|
||||
## Installation via Docker
|
||||
|
||||
|
@ -30,6 +30,7 @@ export class ListenerService {
|
||||
}
|
||||
for (const listenerConfig of config) {
|
||||
const app = expressApp();
|
||||
app.set('x-powered-by', false);
|
||||
app.use(Handlers.requestHandler());
|
||||
this.listeners.push({
|
||||
config: listenerConfig,
|
||||
|
Loading…
x
Reference in New Issue
Block a user