What’s that
App hosting is current run in beta testing mode. If you want to try it as one of the first developers you need to leave a request by sending an email on api-support@ok.ru
Don’t forget to specify your app’s id in a request
Now you have an option to host your game’s static files on OK platform for free.
This means there is no need to rent a domain and a dozen of server to make your app available for user’s.
You just need to archive your app’s files in a zip-archive and upload it in app’s settings. That’s it, your app is hosted on OK now and is available for everyone by an URL we’ve provided you with.
At the moment this option is enabled by us manually only for apps and developers who’ve requested to try it first. But after some time it will be available for every app and developer in app’s settings:
How it works
If you require a bigger data storage size to host your application you can request us to rise an allocated storage size for your app by sending an email to this address: api-support@ok.ru.
Please make sure to select a UTF-8 encoding type when archiving your project
To host an app on OK you need to:
- zip you files in a single file;
- make sure you have an index.html file there. This file will be a starting point for user’s who launched your app. But you can change starting point any time in app’s settings;
- currently we have a limit of 10 Mb for a zip file. Limit can be raised in future.
After you’ve uploaded your app in it’s settings you’ll be provided with a unique URL that represents this version of an app.
At a single moment you have up to 5 different versions of an app uploaded for OK. If you need to upload a 6th version - one of existing version has to be removed from app’s settings.
And be aware that it takes some time for an app’s URL to be updated for all users. It takes 5 minutes at most.
Storage for app variables and user states
This hosting option can be used to store stateless app client on our side.
But it’s usually required to have some sort of an in-game state for a user. Or store some other variables.
For this purpose you can use our Storage API to store variables for your game. With this API you can:
- save a variable by a key - storage.set;
- get variable’s value by a key - storage.get;
- get all keys available for user - storage.getKeys.
This API is available not only for application that use our hosting feature but for each and every app created on our platform.