From c196831c3acc82ead129fa01cb91ebcbf6f64cba Mon Sep 17 00:00:00 2001 From: huziibee Date: Mon, 8 Jan 2024 17:19:03 +0200 Subject: [PATCH] ds --- .github/workflows/lightsail-deploy.yml | 1 - AWS-APP/Login/login.js | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lightsail-deploy.yml b/.github/workflows/lightsail-deploy.yml index d035815..f13dd59 100644 --- a/.github/workflows/lightsail-deploy.yml +++ b/.github/workflows/lightsail-deploy.yml @@ -28,5 +28,4 @@ jobs: sudo git clone https://github.com/huziibee/aws-b-app-1.git cd aws-b-app-1 sudo npm install - sudo npm install pm2 -g forever start server.js diff --git a/AWS-APP/Login/login.js b/AWS-APP/Login/login.js index 092a0f7..f1a87cd 100644 --- a/AWS-APP/Login/login.js +++ b/AWS-APP/Login/login.js @@ -5,6 +5,11 @@ const userPool = new AmazonCognitoIdentity.CognitoUserPool({ ClientId: '23hinerifjsno4tbq6bbrcencc', // Generated in the Cognito User Pool settings }); +document.addEventListener('DOMContentLoaded', function() { + if (window.location.href === '' ) { + window.location.href = '../Login/index.html'; + } +}) function loginUser(name, password) { const authenticationDetails = new AmazonCognitoIdentity.AuthenticationDetails({