| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
The CodePush Server is a Node.js application that powers the CodePush Service. It allows users to deploy and manage over-the-air updates for their react-native applications in a self-hosted environment.
Please refer to react-native-code-push for instructions on how to onboard your application to CodePush.
The CodePush Server requires Azure Blob Storage to operate. For the local setup, there is an option to use emulated local storage with Azurite. Please follow Azurite official documentation to install and run it locally. Additionally, you need to specify EMULATED flag equals true in the environmental variables.
To run the CodePush Server locally, follow these steps:
Clone the CodePush Service repository to your local machine.
Copy the .env.example file to a new file named .env in the root directory:
cp .env.example .envFill in the values for each environment variable in the .env file according to your development or production setup.
Install all necessary dependencies:
npm installCompile the server code:
npm run buildLaunch the server with the environment-specific start command:
npm run start:envBy default, local CodePush server runs on HTTP. To run CodePush Server on HTTPS:
Warning! When hosting CodePush on Azure App Service HTTPS is enabled by default.
For more detailed instructions and configuration options, please refer to the ENVIRONMENT.md file.
CodePush Server is designed to run as Azure App Service.
To deploy CodePush to Azure, an active Azure account and subscription are needed. For more information, follow Azure's official documentation. During the deployment process, the included bicep script will create bare minimum Azure services needed to run CodePush Server including:
Additionally, for user authentication, a GitHub or Microsoft OAuth application is needed. More detailed instructions on how to set up one can be found in the section OAuth Apps.
NOTE Please be aware of project-suffix naming limitations for resources in Azure .
Warning! The created Azure Blob Storage has default access settings. This means that all users within the subscription can access the storage account tables. Adjusting the storage account access settings to ensure proper security is the responsibility of the owner.
In order for react-native-code-push to use your server, additional configuration value is needed.
in strings.xml, add following line, replacing server-url with your server.
<string moduleConfig="true" name="CodePushServerUrl">server-url</string>
in Info.plist file, add following lines, replacing server-url with your server.
<key>CodePushServerURL</key> <string>server-url</string>
CodePush uses GitHub and Microsoft as identity providers, so for authentication purposes, you need to have an OAuth App registration for CodePush. Client id and client secret created during registration should be provided to the CodePush server in environment variables. Below are instructions on how to create OAuth App registrations.
Both work and personal accounts use the same application for authentication. The only difference is property Supported account types that is set when creating the app.
Installation metrics allow monitoring release activity via the CLI. For detailed usage instructions, please refer to the CLI documentation.
Redis is required for Metrics to work.
| Back | FazBrowse Home | New Git URL |