Extensions let you connect with external APIs, perform mutations, and render dynamic pages.
- Data sources: provide data to be displayed on a page through Frontend components.
- Actions: let you perform API requests using HTTP endpoints.
- Dynamic page handler: lets you resolve the page folder URLs dynamically and render content dynamically based on the path.
We currently support Node.js version 16.x for extensions.
packages/<project-name>/backend/index.ts in your GitHub customer repository.
- Two data source extensions:
- Four action extensions:
Before developing extensions, ensure you have set up your project. The extension development process works as follows:
- You edit an extension source file locally. This can be the
backend/index.tsor any file imported inside of it.
- The webpack file watcher detects the change and rebuilds the project.
- If the build is successful, it is synchronized to the extension runner with your developer API token.
- The API hub extension runner detects the change and runs the latest code on the next execution.
To start the extension development, run the following command on your command-line tool in the root directory of your project repository.
This command starts the build processes and opens the CLI dashboard from where you can monitor the extension logs as follows:
bkey to see the build log of your extensions.
ekey to see the execution logs of your extensions running on the extension runner. The logs include run time errors,
console.logcalls from the extensions during execution, information about the upload of the extension build after recompile, and information about the execution of extensions.
For more information about developing using the CLI, see CLI.
Extension build process
A pre-configured webpack build process automatically starts when you run
frontastic run from the CLI. The extensions run on the extension runner and are synchronized automatically after file save during development.