Skip to content

Commit ef7a41b

Browse files
committed
feat: update environment variables in .env.template and app.js for configuration consistency
1 parent e291888 commit ef7a41b

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DATABASE_URL=
2-
DATABASE_NAME=
3-
HOST=
4-
PORT=
1+
DATABASE_URL=mongodb://admin:password@localhost:27017
2+
DATABASE_NAME=LemoncodeCourseDb
3+
HOST=localhost
4+
PORT=5000

01-contenedores/lemoncode-challenge/node-stack/backend/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const app = express();
1212
const DB_URL = process.env.DATABASE_URL || 'mongodb://localhost:27017';
1313
const DB_NAME = process.env.DATABASE_NAME || 'ClassesDb';
1414
const HOST = process.env.HOST || '0.0.0.0';
15-
const PORT = 5000;
15+
const PORT = process.env.PORT || 5000;
1616

1717
let db;
1818
let classesCollection;

01-contenedores/lemoncode-challenge/node-stack/backend/client.http

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@host=http://localhost:5000
1+
@host=http://localhost:5001
22

33
### Get all classes
44
GET {{host}}/api/classes
@@ -147,6 +147,7 @@ Content-Type: application/json
147147
}
148148

149149
### Session 12: SESIÓN IA III
150+
# @name class
150151
POST {{host}}/api/classes
151152
Content-Type: application/json
152153

@@ -159,18 +160,9 @@ Content-Type: application/json
159160
"level": "Beginner"
160161
}
161162

162-
### Session 13: Demo Class
163-
POST {{host}}/api/classes
164-
Content-Type: application/json
165163

166-
{
167-
"name": "Demo Class",
168-
"instructor": "Gisela Torres",
169-
"startDate": "2025-09-26T18:00:00Z",
170-
"endDate": "2025-09-26T20:00:00Z",
171-
"duration": 2,
172-
"level": "Beginner"
173-
}
164+
### Get classes by from the previous posts
165+
@classId={{ class.response.body._id }}
174166

175167
### Get a class by ID (replace {id} with actual ID)
176168
GET {{host}}/api/classes/{{classId}}

0 commit comments

Comments
 (0)