bits-to-dead-trees 2.9.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # bits-to-dead-trees
2
2
 
3
+ ## 2.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`8a7bd14`](https://github.com/rmehner/bits-to-dead-trees/commit/8a7bd148f48fa164c0ef0657ada5d57fd17688ab) Thanks [@rmehner](https://github.com/rmehner)! - Allow to use `PORT` instead of `SERVER_PORT` as environment variable to set the listening port.
8
+
9
+ This is to be more in line with most hosting providers.
10
+ `PORT` takes precedence over `SERVER_PORT`. Default is 8000.
11
+
3
12
  ## 2.9.0
4
13
 
5
14
  ### Minor Changes
package/Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
1
  FROM mcr.microsoft.com/playwright:v1.39.0
2
2
 
3
3
  ENV NODE_ENV=production
4
- ENV SERVER_PORT=8000
4
+ ENV PORT=8000
5
5
  ENV SERVER_ADDRESS=0.0.0.0
6
6
 
7
7
  WORKDIR /app
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bits-to-dead-trees",
3
3
  "author": "Robin Mehner <robin@coding-robin.de>",
4
- "version": "2.9.0",
4
+ "version": "2.10.0",
5
5
  "description": "Turn HTML into PDF files",
6
6
  "repository": "github:rmehner/bits-to-dead-trees",
7
7
  "license": "Apache-2.0",
@@ -30,7 +30,7 @@
30
30
  "ts-check": "npx tsc --noEmit"
31
31
  },
32
32
  "dependencies": {
33
- "fastify": "^4.24.1",
33
+ "fastify": "^4.24.2",
34
34
  "playwright-core": "^1.39.0"
35
35
  },
36
36
  "devDependencies": {
package/server.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import app from "./app.js";
2
- const SERVER_PORT = process.env["SERVER_PORT"] ?? 8000;
2
+ const PORT = process.env["PORT"] ?? process.env["SERVER_PORT"] ?? 8000;
3
3
  const SERVER_ADDRESS = process.env["SERVER_ADDRESS"] ?? "localhost";
4
4
 
5
5
  const server = app({
@@ -19,7 +19,7 @@ const server = app({
19
19
 
20
20
  const startServer = async () => {
21
21
  try {
22
- await server.listen({ port: +SERVER_PORT, host: SERVER_ADDRESS });
22
+ await server.listen({ port: +PORT, host: SERVER_ADDRESS });
23
23
  } catch (error) {
24
24
  console.error(error);
25
25
  process.exit(1);