Proper way to insert data via Strapi from external script but on same server?

I would not recommend executing JS files manually. Since that’s a really bad practice.

A better approach to connect two different apps (as you mentioned, strapi and another PHP app) is to use REST API. Create an Admin role in Strapi which has access to update everything, generate a token for it and use it in your PHP code to make requests to the Strapi’s APIs.

Short answer: You can’t. You can’t achieve that in any node app.

1 Like