Member-only story

How To Create a web-based form to send an email with defined information via React JS?

DigNo Ape
6 min readDec 29, 2019

--

Purpose: We are going to build a web-based form to allow users to select options and to send an formatted email to the target recipients.

Environment:

1. Install Node js which is a platform for React js development. ( LINK)

2. Create root folder, initialize npm and install required package. This will be our backend

C:\Users\username\Desktop\reactApp>npm init C:\Users\username\Desktop\reactApp>npm install react react-dom --save C:\Users\username\Desktop\reactApp>npm install webpack webpack-dev-server webpack-cli --save

3. We will need to set up package.json file under the root folder. (For Back End)

{
"name": "backend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.19.0",
"concurrently": "^5.0.0",
"express": "^4.17.1",
"mssql": "^6.0.0",
"nodemailer": "^6.3.1",
"nodemon": "^1.19.3"
},
"devDependencies": {},
"scripts": {
"start": "node index.js",
"server": "nodemon index.js",
"client": "npm run start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client \""
}
}

4. We will need to create a front end folder called client and do the same thing of step 2 and set up package.json file under the client folder. (For Front End)

--

--

DigNo Ape
DigNo Ape

Written by DigNo Ape

我們秉持著從原人進化的精神,不斷追求智慧的累積和工具的運用來提升生產力。我們相信,每一個成員都擁有無限的潛力,透過學習和實踐,不斷成長和進步。

No responses yet