Skip to content

Commit 450016c

Browse files
committed
removed comments
1 parent 9cd5eb4 commit 450016c

File tree

5 files changed

+1
-12
lines changed

5 files changed

+1
-12
lines changed

examples/docker/books/BookController.js

-5
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ BookController.deleteBook = (req, res, next) => {
5656
// This controller gets order info from the order application
5757
BookController.getorderinfo = (req, res, next) => {
5858
console.log('req.headers (in bookController.js):', req.headers);
59-
// const { body } = req;
60-
// since it's a get request, you technically don't need
61-
// all the headers but it's more declarative this way
62-
// fetch(`http://orders:${process.env.ORDERS_PORT}/orders/getorders`, {
6359
fetch(`http://orders:7777/orders/getorders`, {
6460
method: 'GET',
6561
headers: {
@@ -69,7 +65,6 @@ BookController.getorderinfo = (req, res, next) => {
6965
})
7066
.then((response) => response.json())
7167
.then((results) => {
72-
// const info = results.forEach((curr) => JSON.stringify((curr)));
7368
res.locals.getorderinfo = results;
7469
return next();
7570
})

examples/docker/books/BookServer.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ app.use('/', chronos.track());
1717
app.use(cors());
1818
app.use('/', express.static(path.resolve(__dirname, '../frontend')));
1919

20-
// CHAOS FLOW - SIMPLY A TEST FOR THE EXPESS SERVER
20+
// CHAOS FLOW - SIMPLY A TEST FOR THE EXPRESS SERVER
2121
app.use((req, res, next) => {
2222
console.log(
2323
`***************************************************************************************
@@ -52,7 +52,6 @@ app.get('/books/getordersinfo', controller.getorderinfo, (req, res) => {
5252

5353
// Global error handler
5454
app.use((error, req, res, next) => {
55-
// console.log(err.stack);
5655
const defaultErr = {
5756
log: 'Express error handler caught unknown middleware error',
5857
status: 400,

examples/docker/customers/CustomerController.js

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ CustomerController.getbooksinfo = (req, res, next) => {
5555
})
5656
.then((response) => response.json())
5757
.then((results) => {
58-
// const info = results.forEach((curr) => JSON.stringify((curr)));
5958
res.locals.booksinfo = results;
6059
return next();
6160
})

examples/docker/customers/customerserver.js

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ app.get('/customers/getbooksinfo', controller.getbooksinfo, (req, res) => {
5757

5858
// Global error handler
5959
app.use((error, req, res, next) => {
60-
// console.log(err.stack);
6160
const defaultErr = {
6261
log: 'Express error handler caught unknown middleware error',
6362
status: 400,

examples/docker/frontend/server.js

-3
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@ app.all('/books/*', (req, res) => {
4747

4848
app.all('/customers/*', (req, res) => {
4949
console.log('redirecting to customers');
50-
// apiProxy.web(req, res, { target: customers });
5150
res.redirect(customers + req.originalUrl);
5251
});
5352

5453
app.all('/orders/*', (req, res) => {
5554
console.log('redirecting to orders');
56-
// apiProxy.web(req, res, { target: orders });
5755
res.redirect(orders + req.originalUrl);
5856
});
5957

@@ -72,6 +70,5 @@ app.use((error, req, res, next) => {
7270

7371
// Open and listen to server on specified port
7472
app.listen(3000, () => {
75-
// console.log(`Frontend server running on port ${process.env.FRONTEND_PORT} ...`);
7673
console.log('Frontend server running on port 3000 ...');
7774
});

0 commit comments

Comments
 (0)