High-level questions re: migrating Node.js backend into an ICP backend canister

After migrating a React SPA onto the ICP chain I’m now trying to do the same with an app that has a React.js frontend and simple Node.js (Express) backend that supports a single API route, both GET and POST methods supported. This API endpoint simply reads and writes data to a server-side JSON file (currently using GCP cloud for backend.)

I have already deployed the front end React app both locally and in production which is still using GCP backend for the API calls; however I’m wondering what my options are for migrating the backend to ICP and if there’s any general guidance/suggestions from the community?

From my readings thus far I don’t think it’s possible to deploy my express.js backend as a canister (?) and I would instead need to use Motoko or one of the other supported backend canister languages like Rust (neither of which I’ve used before). Since all this backend needs to do is read/write data a JSON file is my best bet porting my express.js backend into a Motoko or Rust backend? Or are there other perhaps simpler options the community might suggest?

Thanks and keep up the great work!

1 Like

You’ll have to do some adjustments, but you can stay in the JS world: GitHub - demergent-labs/azle: TypeScript and JavaScript CDK for the Internet Computer

1 Like

so we have to do some adjustment in Node Backend using Azle TS JS CDK to deploy on ICP Canister

Thanks guys, I’m reading the docs now on the Azle JS CDK and will let you know how it goes or if I have further questions. Cheers!

1 Like