diff --git a/.github/workflows/cd_backend.yml b/.github/workflows/cd_backend.yml new file mode 100644 index 0000000..d419c79 --- /dev/null +++ b/.github/workflows/cd_backend.yml @@ -0,0 +1,29 @@ +## build the docker image +name: Deploy the backend + +on: + push: + branches: [dev] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout the code + uses: actions/checkout@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + file: ./apps/http-server/Dockerfile + push: true + tags: codeheist/rexial-http-server:${{ github.sha }} + diff --git a/apps/http-server/src/controllers/authController.ts b/apps/http-server/src/controllers/authController.ts index 6d0e0e8..1406a4e 100644 --- a/apps/http-server/src/controllers/authController.ts +++ b/apps/http-server/src/controllers/authController.ts @@ -12,7 +12,6 @@ export const userRegisterController = async (req: Request, res: Response) => { const { name, email, password } = req.body; - console.log("The name , email and passwords are: ", name, email, password) // is user existed already const isUserExisted = await prisma.user.findUnique({ @@ -49,7 +48,6 @@ export const userRegisterController = async (req: Request, res: Response) => { }) } catch (error) { - console.log("signupError", error) return errorResponse(res, 500, "Internal Server Error...") } @@ -91,7 +89,6 @@ export const userLoginController = async (req: Request, res: Response) => { }) } catch (error) { - console.log("Login error is: ", error); return errorResponse(res, 500, "Internal Server Errror....") } } @@ -116,7 +113,6 @@ export const getLoggedInUserController = async (req: Request, res: Response) => }) } catch (error) { - console.log("Auth verification failed", error); return errorResponse(res, 500, "Internal Server Error") } } \ No newline at end of file