Skip to main content

Working with server

JavaScript Event Calendar allows working both with the client and server data. The widget doesn't have any special requirements for the backend. It can be easily connected with any backend platform which supports the REST API (RESTful API).


By default, the widget is shipped with the built-in Go and Node backend. But you can use your custom server scripts as well



JavaScript Event Calendar has the RestDataProvider service that completely supports REST API for dealing with the backend. It allows interacting with the server and save all the performed operations with data.

REST methods

The RestDataProvider service includes the special REST methods for dynamic data loading:

Interacting with backend

To interact with the server, you need to connect RestDataProvider to the corresponding server scripts. If you want to use the built-in backend, you can find the needed scripts in the following repositories:

or you can create a custom one.

To connect RestDataProvider to the backend, you need to call the eventCalendar.RestDataProvider() constructor by passing the corresponding URL as a parameter.

const url = "https://some_backend_url";
const restProvider = new eventCalendar.RestDataProvider(url);

]).then(([events, calendars]) => {
const calendar = new eventCalendar("#root", {

You need to include RestDataProvider into the Event Bus order via the api.setNext() method to perform all the operations with data (adding, editing, deleting etc) and send the corresponding requests to the server


In this snippet you can see how to connect RestDataProvider to the Go backend and load server data dynamically: