0

I already finished development of my site. It was made using HTML, CSS3, jquery and javascript. Like many others it has a form to clients send their projects to my email. Making a simple research, some sites indicates the use of NodeJS and teaches how to configure and program a server application. Fine.

Doing another research to decide web-hosting company, most of them directs me to a VPS hosting plan which enables use of NodeJS. I don't need a plan like this just to enable a form and uses ajax to parse a JSON file to generate some divs.

Do I need to use NodeJS to use form and JSON in my site?

This is my first site and even doing a research I have this doubts.

learner
  • 1,311
  • 3
  • 18
  • 39

1 Answers1

0

I'll start by dropping this here, as it is a pure front end JS way of sending an email (I have not verified if it still works as it was from '08):

Sending emails with Javascript

You don't need to use NodeJS at all. This is just ONE server side language of many. You see this recommended because people are hosting their own sites and building them out from their own server. That's not the case for everyone though.

You don't need to use JSON's at all. This is just ONE way to send around data, forms-encoded is perfectly fine as well.

Most likely you're hosting your site through some third party (godaddy or whatnot) and have your files there. If you're against hosting your own server you can use a simple PHP emailer. Just put the files in a folder, set up your .htaccess to prevent people from getting there, and have the submit button ajax to the path of the php file (handing it the form), and it'll do it's job.

I do not know your use case or setup, so these are based on assumptions, but if it's just a matter of simply sending an email, check out this post (quick search, there are tons):

send email using Gmail SMTP server through PHP Mailer

Community
  • 1
  • 1
Dreamlines
  • 380
  • 4
  • 15