vk-hosting-config.json file
The vk-hosting-config.json configuration file contains settings required to upload game components to the hosting. These settings are used by the vk-miniapps-deploy library.
For details about uploading game files to the hosting, limitations and possible errors, see Static hosting for games.
Example
JSON
{
"static_path": "build",
"app_id": 123456,
"endpoints": {
"mobile": "index.html",
"web": "index.html",
"mvk": "index.html"
}
}Configuration file parameters
Field | Description |
|---|---|
static_path | Folder containing files for upload to the hosting. In the above example, it's the build folder.
Specify the path to the folder relative to the vk-hosting-config.json file. |
app_id | Game identifier. The identifier is displayed in the game settings panel. You can choose not to include this value in the vk-hosting-config.json file. In that case, you will need to store the game identifier in an environment variable named MINI_APPS_APP_ID before adding files to the hosting. |
endpoints | Names of boot files within your project in the static_path folder that will be used upon launching the game:
• mobile — on mobile devices.
• web — for the desktop website.
• mvk — for the mobile website.
When uploading files to the hosting, the vk-mini-apps-deploy library will generate a URL for launching the game in the following format: https://<server_address>/<path_to_boot_file>. The path to file includes its name and is specified from the root of the static_path folder. The obtained URL is also specified in the game settings panel in Placement. |
noprompt | Parameter that defines whether the library will request confirmation upon upload. If the value is 1, the library will not ask questions in the command line window and use default values. Use this mode for automatic file upload to the hosting, such as from CI/CD. For details, see Uploading files to hosting from automated builds. |
proxy_url | Parameter that adds the option to execute all API requests using a specified proxy server. |
See more
- •
- •