In the Developer Portal, some extensions have a Base URL field. This indicates that the extension must provide the URL of a server that can receive and respond to HTTP requests from Canva. You can use any programming language, framework, or architecture to handle these requests.
This tutorial explains how to set up a Base URL with:
Express.js - A minimal web framework for Node.js.
Glitch - A free, web-based editor for developing (and automatically deploying) Node.js apps.
Navigate to glitch.com.
Select New Project.
This opens Glitch's code editor.
Select Add package.
Select the first result.
This installs Express.js.
Replace the contents of the
server.js file with the following code:
const express = require('express');const app = express();app.use(express.json());app.use(express.static('public'));// Routes go hereapp.listen(process.env.PORT || 3000);
This code initializes an Express.js server without any endpoints. The required endpoints depend the extensions added to the endpoint and how the extensions are configured.
For Canva to send requests to a Base URL, it needs to be exposed via a publicly available URL. This is something that Glitch provides without any further setup.
To get the public URL of a Glitch server:
Copy the URL from the Live site field.
This URL is the value that should be entered into an extension's Base URL field.
To verify that the server is running as expected — and to debug any errors that may occur — it's useful to view the logs.
To view the logs of a Glitch server:
To learn more about Glitch, see the Glitch Help Center.