Skip to content

Commit ba05c96

Browse files
authored
Fix production webserver startup (#112)
The bot works, but the (presently disused) webservice did not. Should fix it 🤞
1 parent 7fe3552 commit ba05c96

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

index.prod.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
import "dotenv/config";
55
import express from "express";
66

7-
// import Sentry from "#~/helpers/sentry.server";
8-
97
// This only exists after a production build, when this file is copied into Docker
108
import { app as rrApp } from "./build/server/index.js";
119

1210
const app = express();
1311

14-
console.log("Starting production server");
12+
console.log("Starting production webserver");
1513
app.use(rrApp);
1614

1715
app.use(
@@ -23,10 +21,7 @@ app.use(express.static("build/client", { maxAge: "1h" }));
2321
/** ERROR TRACKING
2422
Must go after route handlers
2523
*/
26-
// app.use(Sentry.Handlers.errorHandler());
27-
2824
const errorHandler = (error) => {
29-
// Sentry.captureException(error);
3025
if (error instanceof Error) {
3126
console.log("ERROR", error.message, error.stack);
3227
} else if (typeof error === "string") {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"kysely": "kysely",
1818
"": "",
1919
"start:migrate": "kysely migrate:list; kysely migrate:latest",
20-
"start:bot": "node build/server/index.js",
20+
"start:bot": "node ./index.prod.js",
2121
"prepare": "husky || true",
2222
"typecheck": "react-router typegen && tsc -b",
2323
"build:css": "npm run generate:css --minify",

0 commit comments

Comments
 (0)