fluid.fn. Functions aren’t available yet.
What happens today
- A publish refuses a site that has a
functions/folder or aconfig/functions.json, and nothing is published.fluid sites lintreports the same thing before you publish. fluid.fn.fetch(name)calls/_fluid/fn/<name>on the site’s own address, and every call answers404with the codefn_not_available.fluid.fn.fetchreturns that response as it is, so code you write against it keeps working once functions ship.- You can already keep values for functions with environment variables and secrets. Nothing reads them yet.
What to use instead
- To save what visitors send, such as a form, use the site database with
fluid.db. Its tables carry their own access rules. - To read Fluid data as the visitor, use
fluid.api. See the Sites SDK and Use the Member API from a Site. - A project that needs server code now, server rendering or its own Postgres is a Mist app.