Creating Projects

All project directories live in the /home/cloud/projects folder on your instance.

Working With Projects

Use the cloud tool to generate and remove projects.

For example, once logged in to your instance, you can generate a new project template like so:

sudo cloud add <myprojectname>

This command will build the following structure in the projects directory:

/projects
  /myprojectname
    api.lua
    config.lua
    /tpl
      index.tpl

To remove a project:

sudo cloud remove <myprojectname>

Note: While app directories are cleared, datastore entries are not removed.

config.lua

The config.lua file holds project specific configuration data. It also holds the generated API key for the project. This key is used to pair your client. You can change it if you feel the need.

Key Description Type Default Required
key The project API key. string generated Y
--apps/myapp/config.lua
local config =
{
  key = "< generated >"
}
return config

Don't change the config key after you've released your app!

/tpl

The tpl directory holds templates that can be used to render dynamic data in different formats, including HTML. Learn more about templating in the cloud.template module docs.