Skip to content

Commit b53a62f

Browse files
author
Katie Harris
committed
Update server Dockerfile to use src files. Update server app.js file to use /v1 prefix and update nexlayer.yaml to have frontend serve at / and use /v1 prefix for server
1 parent 8a73c5f commit b53a62f

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

client-fe/public/._robots.txt

-4 KB
Binary file not shown.

nexlayer.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ application:
2929
# 🚀 Frontend (React App)
3030
- name: react
3131
image: ghcr.io/stellarstack/stellar-gemini-ai-chatapp-frontend:v0.1
32-
path: /chatapp
32+
path: /
3333
servicePorts:
3434
- 3000
3535
vars:
3636
REACT_APP_GEMINI_KEY: "AIzaSyDokqxtMSRDry1ZEltMa4kJov03pMNO5sY"
3737
REACT_APP_GOOGLE_CLIENT_ID: "1070942776095-7um66fb0m81272ajebmbdke408avf035.apps.googleusercontent.com"
3838
REACT_APP_GOOGLE_CLIENT_SECRET: "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"
3939
REACT_APP_GOOGLE_OAUTH_REDIRECT_URL: "<% URL %>/auth/google/callback"
40-
REACT_APP_SERVER_ENDPOINT: "<% URL %>"
40+
REACT_APP_SERVER_ENDPOINT: "<% URL %>/v1"
4141

4242
# 🗄️ MongoDB (Data Layer)
4343
- name: mongodb

server/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ COPY package-lock.json ./
88

99
RUN npm install
1010

11-
COPY . .
11+
COPY ./src/. .
1212

1313
EXPOSE 3030
1414

15-
CMD npm run dev
15+
CMD ["node", "app.js"]

server/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ app.use(cros(crosOption));
2929
import publicRoutes from "./router/public.js";
3030
import authRoutes from "./router/auth.js";
3131

32-
app.use("/gemini", publicRoutes);
33-
app.use(authRoutes);
32+
app.use("/v1/gemini", publicRoutes);
33+
app.use("/v1", authRoutes);
3434

3535
app.use((error, req, res, next) => {
3636
console.log(error);

server/src/app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ import publicRoutes from "./router/public.js";
2828
import authRoutes from "./router/auth.js";
2929

3030
app.use("/v1/gemini", publicRoutes);
31-
app.use(authRoutes);
31+
app.use("/v1", authRoutes);
3232

3333
// Serve static files from the React app build at /chatapp
34-
app.use("/chatapp", express.static(path.join(__dirname, "../../client-fe/build")));
34+
//app.use("/chatapp", express.static(path.join(__dirname, "../../client-fe/build")));
3535

3636
// Catch-all handler to serve React's index.html for any non-API route under /chatapp
37-
app.get("/chatapp/*", (req, res) => {
38-
res.sendFile(path.join(__dirname, "../../client-fe/build", "index.html"));
39-
});
37+
//app.get("/chatapp/*", (req, res) => {
38+
// res.sendFile(path.join(__dirname, "../../client-fe/build", "index.html"));
39+
//});
4040

4141
app.use((error, req, res, next) => {
4242
console.log(error);

0 commit comments

Comments
 (0)