Javascript – How to sent (fetch) data from js to node.js
I want to make a register function I try to do like this: function finish() { if (valid) { const postData = { email: email.value, username: username.value, password: password.value, password2: password2.value }; fetch('/register', { method: 'POST', headers: { "Content-type": "aplication/json"…