Is it possible to use "bryntum engine" in back-end (node)?
Something like this:
const project = new ProjectModel({
dependenciesData: data.dependencies.rows,
tasksData: data.tasks.rows,
});
Pavlo Miklashevych
Sr. Frontend Developer
We don't have an example how to use it for node, but you can already try using our engine on server. We will improve our docs and will come up with a guide and example in the future, though there is no ETA. If you have any questions related to the engine work, please feel free to ask. You can find docs here: https://www.bryntum.com/docs/gantt/engine/
Pavlo Miklashevych
Sr. Frontend Developer
Hi,
index.js:
import { SchedulerBasicProjectMixin } from './lib/Engine/quark/model/scheduler_basic/SchedulerBasicProjectMixin.js'
const project = new SchedulerBasicProjectMixin({
eventsData: [{ name: 'Task 1' }]
})
When I run node . , I got:
(node:14148) ExperimentalWarning: The ESM module loader is experimental.
file:///C:/Z-DEV/gantt/lib/Core/data/Store.js:405
if (!rec?.isDestroyed) {
^
SyntaxError: Unexpected token '.'
Hi,
You need to use Node 14 because sources uses optional chaining: ?.
. And even with Node 14, the esm
loader does not support the optional chaining https://github.com/standard-things/esm/issues/866
You can try to use the native Ecma modules support, built-in in the Node, or may be just manually "transpile" the ?.
operator - there should be only 2 or 3 places where its needed. The error message indicates the position in sources where it needs to be done.
Read the API documentation