Skip to content

Commit

Permalink
fix: fix custom tracker script file route error in production
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Apr 7, 2024
1 parent 5d8c187 commit 2a3e2af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,5 +1,5 @@
.env
public/tracker.js
src/client/public/tracker.js
geo

# Logs
Expand Down
2 changes: 1 addition & 1 deletion src/server/app.ts
Expand Up @@ -50,7 +50,7 @@ app.use('/trpc', trpcExpressMiddleware);

if (env.customTrackerScriptName) {
app.get(`/${env.customTrackerScriptName}`, (req, res) =>
res.sendFile(path.resolve(__dirname, './public/tracker.js'))
res.sendFile(path.resolve(process.cwd(), './public/tracker.js'))
);
}

Expand Down

0 comments on commit 2a3e2af

Please sign in to comment.