How can I get d3 server-side in Meteor?

I’d like to use a part of d3 server-side in a Meteor app. Specifically, d3’s CSV utilities. However, the package.js file only provides d3 to clients.

Does it make sense to use the d3 CSV utilities server-side? If yes, what’s the canonical way to make this happen?

Crossposted here.

Copy the d3 package into your /packages directory, and hack line 12 to be either of the two following lines:

api.addFiles(“d3.js”);
api.addFiles(“d3.js”, “server”);

The first will copy it on both server and client. The scond will only copy it to the server. Good luck!

Cool, thank you. Does it make sense to use the d3 CSV utilities server-side?

I think it would be awesome to use d3 server side. I have like a zillion use cases for it (mostly involving server-side simulations). But I don’t think it will work without a DOM. :(. If you can get it to work, there will be some people very interested!