This basic CRUD web application allows users to log in and manage user privileges in it. It contains 2 parts, User Management and Department Management, which user can add/select/edit/delete records.
Developed by using javascript, jQuery, Node.js, Express, EJS, AJAX, MySQL, Bootstrap.
- GET records.
- POST records.
- Edit records.
- Delete one record/ delete multiple records.
- Verify user by a random generated code.
- Pagination.
- Session.
express-loginAdmin
├─bin
│ www
│
├─dump_sql
│ dump_sys_db.sql
│
├─public
│ ├─images
│ │
│ ├─javascripts
│ │
│ └─stylesheets
│ index.css
│ jquery-ui.css
│ login.css
│ user.css
│
├─routes
│ department.js
│ index.js
│ users.js
│
└─views
department_add.ejs
department_edit.ejs
department_list.ejs
error.ejs
sys_index.ejs
sys_login.ejs
user_add.ejs
user_edit.ejs
user_list.ejs
app.js
favicon.ico
package.json
README.mdClone this repository and install it, then run it locally http://localhost:3000/
git clone https://github.com/miaoT/express-loginAdmin.git
cd express-loginAdmin
npm install
Create a database named sys_db and create 3 tables: department, loginuser, usergroup. There is an example of this database that you can import, which locates in /dump_sql/dump_sys_db.sql.
You could have your own username and password to log in, by command
INSERTon MySQL. For example,
INSERT INTO loginuser (userName,password) VALUES ("YOUR_USERNAME","YOUR_PWD");
You could log in as John and its pwd 9999 to view it.
