microsoft / code-push-server

Standalone CodePush server from App Center
MIT License
616 stars 161 forks source link

Switching to Azure Storage from local not working #40

Closed jerinjohnk closed 1 week ago

jerinjohnk commented 2 weeks ago

While switching to azure storage. 1) The github Authorization url callback .auth/login/github/callback worked instead of auth/callback/github as specified in the Readme. Is this correct?

2) Once I allow github access while registering using code-push-standalone register https://codepush-<project_suffix>.azurewebsites.net. It now lands to https://codepush-.azurewebsites.net/auth/register?hostname=. But now shows a blank page with Cannot GET /auth/register The console log is Failed to load resource: the server responded with a status of 404 (Not Found). What am I missing here to complete the authentication?

3) While trying to get this to work in Azure Web portal I navigated to codepush-<project_suffix> Web App. Inside Settings -> Authentication tab I selected Github Identity provider. Do you know if this step is required?

EDIT After deployment, we must add the api folder code to the deployed appservice. There are two ways 1) VS Code add Azure App Service extension. Login to your account. Under your resource select App Services -> Right click on your resource and select Deploy to Web App followed by selecting the location of api folder. 2) The second way is by going to the portal online, cloning your git account and uploading the api folder there. The credentials can be found here. Image

Hope that helps

veaniswich commented 1 week ago

@jerinjohnk You need to copy the code in the api directory to the newly created repository, and then deploy it to Azure to run it. For specific steps, see how to deploy a webapp service

veaniswich commented 1 week ago

@jerinjohnk When you successfully deploy, when you visit the domain name, the web page will display Welcome to the CodePush REST API!

jerinjohnk commented 1 week ago

Thanks, @veaniswich , for pointing me in the right direction; I was missing this step. I have updated my question with the solution that I found.