Managing Server Code

Use the command line tool to manage server code in Kii Cloud.

This topic describes the steps to upload server code created using the server code syntax to Kii Cloud and make it executable.

Preparation

Take the following preparatory steps:

  1. Review the management procedures.

    In order to manage server code, it is important to understand the concept of server code versioning.

    Review the management procedures for server code in Management Features for Server Code.

  2. Install the command line tool.

    Install the command line tool on your development PC by following the steps described in Installation of the command line tool.

Management tasks

Start managing server code when you are ready.

  1. Prepare necessary files.

    You need to have a server code file. If you are going to execute server code automatically, you also need a server hook configuration file.

    • A server code file contains all endpoints and required functions.
    • A server hook configuration file contains all settings for trigger-based and schedule-based hooks. For the syntax, see Server Hook Configuration File. If you are going to execute server code only manually, you do not need a server hook configuration file.
  2. Deploy server code.

    Use the command line tool to deploy your server code and server hook configuration file. See Deploying Server Code for more details.

    The deployed server code and server hook configuration file become active automatically, unless you specify otherwise. Once deployed, the server code will be launched when the conditions specified in the server hook configuration file are met. You can also launch the server code manually by following the procedures described in Executing Server Code.

  3. Manage server code.

    You can manage your server code (e.g. activating, deactivating, and deleting). For available management features, see the feature list in Using the Command Line Tool

    For example, suppose you find a bug in a new version of server code and want to revert to an old version. You can easily accomplish this by leveraging the listing feature and the activating/deactivating features.