Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Jan 16, 2025
1 parent b78df2e commit 7e80610
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
25 changes: 17 additions & 8 deletions backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,26 @@ export async function main() {
return { processed };
})
// Serve static files in production
.use(staticPlugin({
assets: process.env.FRONTEND_DIST_PATH || path.join(process.cwd(), "../frontend/dist"),
prefix: "/",
indexHTML: true // Enable SPA routing
}))
.use(
staticPlugin({
assets:
process.env.FRONTEND_DIST_PATH ||
path.join(process.cwd(), "../frontend/dist"),
prefix: "/",
indexHTML: true, // Enable SPA routing
}),
)
.get("/debug/env", () => {
return {
cwd: process.cwd(),
frontendPath: process.env.FRONTEND_DIST_PATH || path.join(process.cwd(), "../frontend/dist"),
resolvedPath: path.resolve(process.env.FRONTEND_DIST_PATH || path.join(process.cwd(), "../frontend/dist")),
env: process.env.NODE_ENV
frontendPath:
process.env.FRONTEND_DIST_PATH ||
path.join(process.cwd(), "../frontend/dist"),
resolvedPath: path.resolve(
process.env.FRONTEND_DIST_PATH ||
path.join(process.cwd(), "../frontend/dist"),
),
env: process.env.NODE_ENV,
};
})
.onError(({ error }) => {
Expand Down
6 changes: 4 additions & 2 deletions backend/src/services/twitter/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export class TwitterService {
private async setCookiesFromArray(cookies: TwitterCookie[]) {
const cookieStrings = cookies.map(
(cookie) =>
`${cookie.name}=${cookie.value}; Domain=${cookie.domain}; Path=${cookie.path}; ${cookie.secure ? "Secure" : ""
}; ${cookie.httpOnly ? "HttpOnly" : ""}; SameSite=${cookie.sameSite || "Lax"
`${cookie.name}=${cookie.value}; Domain=${cookie.domain}; Path=${cookie.path}; ${
cookie.secure ? "Secure" : ""
}; ${cookie.httpOnly ? "HttpOnly" : ""}; SameSite=${
cookie.sameSite || "Lax"
}`,
);
await this.client.setCookies(cookieStrings);
Expand Down

0 comments on commit 7e80610

Please sign in to comment.