Skip to content

Commit

Permalink
adicionando dot env
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandes-natanael committed Dec 11, 2023
1 parent a26d361 commit 918d5f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ app.get('/', (req, res) => {
return res.json({ message: 'Running Gateway' });
});

app.use('/schedular', httProxy(process.env.URL_SCHEDULER_SERVICE, { timeout: 10000 }));
app.use('/schedular', httProxy(process.env.URL_SCHEDULAR_SERVICE ? process.env.URL_SCHEDULAR_SERVICE : 'https://2023-2-print-go-user-service-seven.vercel.app', { timeout: 10000 }));
app.use('/user', httProxy(process.env.URL_USER_SERVICE, { timeout: 10000 }));
app.use('/printer', httProxy(process.env.URL_PRINTER_SERVICE, { timeout: 10000 }));

Expand Down
1 change: 1 addition & 0 deletions tests/gateway.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ describe('GET /', () => {
});

it('should return a 200 status and the correct message', async () => {
console.log(process.env.URL_SCHEDULAR_SERVICE);

const response = await request(app).get('/');
expect(response.status).toBe(200);
Expand Down

0 comments on commit 918d5f0

Please sign in to comment.