Write to a text file using Javascript

Site: https://thirsty-kepler-b52ade.netlify.app
Problem:How do I store log information on the server?
Site files are stored in GitHub.

Morning all,
I’m new to netlify but have some web coding experience. I’m using JavaScript for this project, which is reporting through an API. The developer is requiring me to keep logs of all API calls, error messages, etc. Problem is, I cant figure out how to write a text file to the server.

In searching, Netlify doesn’t support PHP. It looks like it supports Node.js, but if so, I have no idea how to get it to work. I spent all day yesterday going down error rabbit holes before throwing in the towel.

As I mention above, my ultimate goal is to write the logs to the server, so if there is a better approach to this, I’m all ears.

Thanks in advance.

Hi,

Since we are a jamstack.org type of host, we don’t run a server for you. Instead, you build your site down to html/css/javascript and assets. We then serve those files through our CDN. Since we don’t actually run a server for you, there is nothing to log on the server-side. As far as logging client-side errors, you can try console.log-ing your errors.

Hope that helps.

It’s an answer and I can deal with! Thanks for the quick response. :grin: