probitaille
probitaille

Reputation: 2007

Is this possible to use a front-end JS Framework on the server side with Node.JS to create a Web service for content delivery?

I have a complete project made with Playcanvas (a JS GameEngine Framework) that uses the HTML canvas tag. This project can also generate images in different format (base64, dataUrl, blob, jpeg).

I want to put this project on the server side to create a new Web service that can deliver images, generated from that Playcanvas project.

So, is this possible to use a functional code from the client-side and put it on the server-side with Node.JS? I know some works like node-canvas that achieve a similar goal.

enter image description here

Upvotes: 1

Views: 244

Answers (1)

krish
krish

Reputation: 196

You can use puppeteer(headless chrome) to get the full control of a browser on the server side. You can then render the images on the server in required format and can export to the front end.

https://github.com/GoogleChrome/puppeteer

Upvotes: 2

Related Questions