Skip to content

Commit 9824c05

Browse files
committed
changing the Port no.
1 parent b760286 commit 9824c05

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
build:
1111
runs-on: [self-hosted]
12-
12+
1313
steps:
1414
- name: Pull Docker image
1515
run: sudo docker pull pratik50/receiptsnap-backend:latest

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
file: Dockerfile
3434
push: true
3535
tags: |
36-
pratik50/receiptsnap-backend:latest
3736
pratik50/receiptsnap-backend:${{ github.sha }}
37+
pratik50/receiptsnap-backend:latest
3838
build-args: |
3939
DATABASE_URL=${{ secrets.DATABASE_URL }}

src/getLocalIPAddress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os from 'os';
22

3-
export function getLocalIPAddress() {
3+
export function getMachineIPAddress() {
44
const interfaces = os.networkInterfaces();
55
for (const name of Object.keys(interfaces)) {
66
for (const iface of interfaces[name]!) {

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import express from 'express';
22
import dotenv from 'dotenv';
33
import authRouter from './routes/auth';
44
import fileRouter from './routes/file';
5-
import { getLocalIPAddress } from './getLocalIPAddress';
5+
import { getMachineIPAddress } from './getLocalIPAddress';
66
import cors from 'cors';
77

88
dotenv.config();
@@ -23,9 +23,9 @@ app.get("/", (req, res) => {
2323
res.send("✅ Your server is running here!");
2424
});
2525

26-
const PORT = process.env.PORT || 3000;
27-
const ip = getLocalIPAddress()
26+
const PORT = 8080;
27+
const ip = getMachineIPAddress()
2828

29-
app.listen(3000, '0.0.0.0', () => {
29+
app.listen(PORT, '0.0.0.0', () => {
3030
console.log(`🚀 Server running at http://${ip}:${PORT}`);
3131
});

0 commit comments

Comments
 (0)