Serve
The serve module provides all functionalities related to serving resources from your app to your public web-server.
Serve
To publish files for public access, use server:
The compressed version of your published file can be access by adding the -compressed suffix.
Clear
To remove all published files in your application's web-server, use clear:
Template
Use a frame template as a response. A snapshot of the template is created and used as the frame image - this can be overridden by providing an existing image on the parameters. See the examples below.
Access
The access function allows access to a JSON object. This function is useful for accessing variables in a POST request's body.
Post Requests
When sending a POST request to your application's web-server, the request is added to a queue and processed in a first-come-first-serve basis. The POST request's body is converted into variables in your application.
Respond
To respond to requests, simply call the respond method:
There are two types of POST endpoints in your app's API.
Default (POST)
/
Raw (POST)
/raw
Responses from the /raw route are delivered as it is written in your application.
Response Object
Redirect
For all sorts of purposes a redirect response can be made to the caller on either default or raw POST requests.
To respond with a redirect, simple call the redirect method:
Questions?
Last updated