Closed TheColorRed closed 8 years ago
Install it via npm
npm i clusterize.js
And use commonJS syntax
var Clusterize = require('Clusterize');
How would you then pass the 2 required options to it?
// load dependency
var Clusterize = require('Clusterize');
// create instance
var clusterize = new Clusterize({
rows: data,
scrollId: 'scrollArea',
contentId: 'contentArea'
});
Alright thanks! I'll give that a try!
To be honest, I never ran Clusterize.js on the node.js as it's browser-oriented library in general.
Module support was implemented for module loaders like require.js, browserify which support amd and commonjs specifications on the client side.
What you trying to achieve by running Clusterize.js on backend side?
I am actually running it using Electron which is to make desktop applications:
Build cross platform desktop apps with web technologies
Electron uses webkit to display the content of the window which is written with HTML/CSS/JavaScript. You can then leverage node to do node related tasks.
So I am making a database manager (Similar to mysql workbench, dbBever, HeidiSQL, etc.)
Cool :+1:
How do you use this within node.js (Specifically electron for desktop applications)?
When I try this I get an error: