Skip to content

Commit be79f27

Browse files
Dachary feedback
1 parent b9cecb8 commit be79f27

3 files changed

Lines changed: 140 additions & 124 deletions

File tree

mflix/README-JAVA-SPRING.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ This is a full-stack movie browsing application built with Java Spring Boot and
55
## Project Structure
66

77
```
8-
├── README-JAVA-SPRING.md
8+
├── README.md
99
├── client/ # Next.js frontend (TypeScript)
10-
└── server/java-spring/ # Java Spring Boot backend
10+
└── server/ # Java Spring Boot backend
1111
├── src/
1212
├── pom.xml
1313
├── .env.example
@@ -31,7 +31,7 @@ This is a full-stack movie browsing application built with Java Spring Boot and
3131
Navigate to the Java Spring server directory:
3232

3333
```bash
34-
cd server/java-spring
34+
cd server
3535
```
3636

3737
Create a `.env` file from the example:
@@ -44,20 +44,32 @@ Edit the `.env` file and set your MongoDB connection string:
4444

4545
```env
4646
# MongoDB Connection
47-
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority
47+
# Replace with your MongoDB Atlas connection string or local MongoDB URI
48+
MONGODB_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/sample_mflix?retryWrites=true&w=majority
49+
50+
# Voyage AI Configuration
51+
# API key for Voyage AI embedding model (required for Vector Search)
52+
VOYAGE_API_KEY=your_voyage_api_key
4853
4954
# Server Configuration
55+
# Port on which the Spring Boot application will run
5056
PORT=3001
5157
5258
# CORS Configuration
59+
# Allowed origin for cross-origin requests (frontend URL)
60+
# For multiple origins, separate with commas
5361
CORS_ORIGIN=http://localhost:3000
62+
63+
# Optional: Enable MongoDB Search tests
64+
# Uncomment the following line to enable Search tests
65+
# ENABLE_SEARCH_TESTS=true
5466
```
5567

5668
**Note:** Replace `username`, `password`, and `cluster` with your actual MongoDB Atlas credentials.
5769

5870
### 2. Start the Backend Server
5971

60-
From the `server/java-spring` directory, run:
72+
From the `server` directory, run:
6173

6274
```bash
6375
# Using Maven Wrapper (recommended)
@@ -125,7 +137,7 @@ The Java Spring Boot backend uses:
125137
To run tests:
126138

127139
```bash
128-
cd server/java-spring
140+
cd server
129141
./mvnw test
130142
```
131143

@@ -182,5 +194,5 @@ If you have problems running the sample app, please check the following:
182194
- [ ] Verify that you have no firewalls blocking access to the server or client ports.
183195

184196
If you have verified the above and still have issues, please
185-
[open an issue](https://github.com/mongodb/sample-app-java-mflix/issues/new/choose)
186-
on the source repository `mongodb/sample-app-java-mflix`.
197+
[open an issue](https://github.com/mongodb/docs-sample-apps/issues/new/choose)
198+
on the source repository `mongodb/docs-sample-apps`.

mflix/README-JAVASCRIPT-EXPRESS.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ This is a full-stack movie browsing application built with Express.js and Next.j
55
## Project Structure
66

77
```
8-
├── README-JAVASCRIPT-EXPRESS.md
8+
├── README.md
99
├── client/ # Next.js frontend (TypeScript)
10-
└── server/js-express/ # Express.js backend
10+
└── server # Express.js backend
1111
├── src/
1212
├── package.json
1313
├── .env.example
@@ -30,7 +30,7 @@ This is a full-stack movie browsing application built with Express.js and Next.j
3030
Navigate to the Express server directory:
3131

3232
```bash
33-
cd server/js-express
33+
cd server
3434
```
3535

3636
Create a `.env` file from the example:
@@ -42,41 +42,54 @@ cp .env.example .env
4242
Edit the `.env` file and set your MongoDB connection string:
4343

4444
```env
45-
# MongoDB Configuration
46-
# Replace with your MongoDB Atlas connection string
45+
# MongoDB Connection
46+
# Replace with your MongoDB Atlas connection string or local MongoDB URI
4747
MONGODB_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/sample_mflix?retryWrites=true&w=majority
4848
49+
# Voyage AI Configuration
50+
# API key for Voyage AI embedding model (required for Vector Search)
51+
VOYAGE_API_KEY=your_voyage_api_key
52+
4953
# Server Configuration
5054
PORT=3001
5155
NODE_ENV=development
5256
53-
# CORS Configuration (frontend URL)
57+
58+
# CORS Configuration
59+
# Allowed origin for cross-origin requests (frontend URL)
60+
# For multiple origins, separate with commas
5461
CORS_ORIGIN=http://localhost:3000
5562
5663
# Optional: Enable MongoDB Search tests
5764
# Uncomment the following line to enable Search tests
5865
# ENABLE_SEARCH_TESTS=true
5966
```
6067

61-
**Note:** Replace `<username>`, `<password>`, and `<cluster>` with your actual MongoDB Atlas credentials.
68+
**Note:** Replace `<username>`, `<password>`, and `<cluster>` with
69+
your actual MongoDB Atlas credentials. Replace `your_voyage_api_key` with
70+
your key.
6271

6372
### 2. Install Backend Dependencies
6473

65-
From the `server/js-express` directory, run:
74+
From the `server` directory, run:
6675

6776
```bash
6877
npm install
6978
```
7079

7180
### 3. Start the Backend Server
7281

73-
From the `server/js-express` directory, run:
82+
From the `server` directory, run:
7483

7584
```bash
7685
# Development mode with hot reloading
7786
npm run dev
87+
```
7888

79-
# Or production mode
89+
90+
Or for production mode, run:
91+
92+
```bash
8093
npm run build
8194
npm start
8295
```
@@ -140,14 +153,14 @@ The Express.js backend uses:
140153
To run tests:
141154

142155
```bash
143-
cd server/js-express
156+
cd server
144157
npm test
145158
```
146159

147160
To run tests with coverage:
148161

149162
```bash
150-
cd server/js-express
163+
cd server
151164
npm run test:coverage
152165
```
153166

@@ -204,5 +217,5 @@ If you have problems running the sample app, please check the following:
204217
- [ ] Verify that you have no firewalls blocking access to the server or client ports.
205218

206219
If you have verified the above and still have issues, please
207-
[open an issue](https://github.com/mongodb/sample-app-nodejs-mflix/issues/new/choose)
208-
on the source repository `mongodb/sample-app-nodejs-mflix`.
220+
[open an issue](https://github.com/mongodb/docs-sample-apps/issues/new/choose)
221+
on the source repository `mongodb/docs-sample-apps`.

0 commit comments

Comments
 (0)