In this tutorial, I am going to create simple register a user and display the data on dashboard using nodejs and mysql.
This tutorial will explain only how to save a record in mysql table and display the table.
To handle post parameters of Http request in Node.js, we use CrudApp module.
step-1 First we install express-generator using npm through command line.
step-2 Then we install crudapp . ‘
step-3 Then we go to the crudapp directory and install npm
step-4 Then we uninstalled Jade App(Jade App is inbuild App in Crudapp for execute html files).
we installed express-handlebars App for executing html files.
step-5 Then we installed mysql using npm.
step–6 Then we create crudapp database and users table in phpmyadmin
step-7 Then we create Connection.js file for connection with mysql database.
step-8 Modified app.js files for adding our required code.
step-9 Create a routes directory and in routes directory create index.js and users.js files.
step-10 index.js file add these codes.
step-11 users.js file add these codes
step-12 Create a public directory and in public directory create js and css directories.
step-13 In js directory add angular.min.js, index.js, jquery.easing.min.js, jquery-1.9.1.min.js and script.js files.
step-14 angular.min.js file add these codes.
step-15 Index.js file add these codes
step-16 jquery.easing.min.js file add these codes
step-17 jquery-1.9.1.min.js file add these codes
step-18 script.js files. file add these codes
step-19 In css directory add reset.min.css and style.css
step-20 In reset.min.css add these codes
step-21 In style.css add these codes
step-22 Create views directory and in views directory create layout.hbs, index.hbs and dashboard.hbs and also add js and css files.
step-23 In layout.hbs add these codes
step-24 In index.hbs add these codes
step-25 In dashboard.hbs add these codes
- Preparing steps for LAMP Installation - October 1, 2021
- What is LAMP Stack? - October 1, 2021
- Python Tutorials: Relational/ Comparison Operators In Python - August 30, 2020