Configuring Apps with bigfuncloud.json
bigfuncloud.json provides instant, safe, and version-controlled configuration of the Big Fun Cloud backend and IDE.
Each app on Big Fun Cloud includes a bigfuncloud.json file. Although this file only has a few configuration options, these options can be very powerful.
For most templates, the initial file will look like this:
The private
setting controls whether or not an app is private. The default setting,
true
, means the app can only be opened by its creator. The app creator must be logged in to
open the
production link.
If I set
private
to
false
(i.e. "public"), the app is instantly available to everyone with the link, no log-in
required.
Every change of bigfuncloud.json takes effect after pressing Deploy Prod.
In the Big Fun Cloud IDE, hovering over each setting shows compact documentation:
With bigfuncloud.json, app creators can set up periodic jobs, similar to cron jobs. Each job is specified by a
path
and expression
. At the frequency designated by the expression (specified in
cron syntax -- learn
more here), Big
Fun Cloud will make an HTTP GET request to the path. In the
future, we will add more options beyond HTTP GET,
such as executing local scripts.
The IDE parses each expression and reports back in human language when each job will be scheduled. Again, the jobs will start to run after the next Deploy Prod. Successes, failures, and job output are reported in Logs. Non-2xx HTTP status codes are shown as failures:
After fixing the path, I can see that my job executed successfully and returned some HTML:
After making changes to bigfuncloud.json, I can use the Dev Shell to commit and push changes to GitHub, just like all other code changes.
Current short reference
{
"private": true or false, (if true, app is private to its creator; if false, completely public)
"jobs": [
{
"expression": "cron expression string", (max frequency 1 minute)
"path": "/path-to-GET", (HTTP GET is made to this relative URL)
}
]
}