Skip to content

Commit 79fdb8d

Browse files
committed
Refactor code structure for improved readability and maintainability
1 parent 9dfc048 commit 79fdb8d

6 files changed

Lines changed: 6 additions & 5 deletions

File tree

client/dist/assets/index-BOof9_PO.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

client/dist/assets/index-Bpdw1MkJ.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
Learn how to configure a non-root public URL by running `npm run build`.
2626
-->
2727
<title>React App</title>
28-
<script type="module" crossorigin src="/assets/index-BOof9_PO.js"></script>
28+
<script type="module" crossorigin src="/assets/index-Bpdw1MkJ.js"></script>
2929
<link rel="modulepreload" crossorigin href="/assets/vendor-DMpUmzNC.js">
3030
<link rel="stylesheet" crossorigin href="/assets/index-C8tj5j6b.css">
3131
</head>

scripts/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async function buildProjects() {
5050
async function copyClientBuildToServer() {
5151
const paths = getProjectPaths();
5252
const clientDistPath = `${paths.client}/dist`;
53-
const serverBuildPath = `${paths.server}/dist/build`;
53+
const serverBuildPath = `${paths.server}/client`;
5454

5555
if (existsSync(clientDistPath) && existsSync(paths.server)) {
5656
log(`${colors.bright}📁 Copying client build to server for SSR...${colors.reset}`, colors.blue);

server-ts/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ yarn-error.log*
77
# Build outputs
88
dist/
99
build/
10+
client/
1011
*.tsbuildinfo
1112

1213
# Environment variables

server-ts/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class AppServer {
160160

161161
private setupSSR(): void {
162162
// Serve React build files
163-
const buildPath = path.join(__dirname, '../build');
163+
const buildPath = path.join(__dirname, '../client');
164164
this.app.use(express.static(buildPath));
165165

166166
// Handle React routing

0 commit comments

Comments
 (0)