https://github.com/shoaibrayeen/profile-creation-application
The App is developed in Node.js, Express.js, Redis and MySQL. The user can create, update, view and soft delete its profile. The purpose for developing the app is to learn how we can implement it as MVC structure.
https://github.com/shoaibrayeen/profile-creation-application
Last synced: 2 months ago
JSON representation
The App is developed in Node.js, Express.js, Redis and MySQL. The user can create, update, view and soft delete its profile. The purpose for developing the app is to learn how we can implement it as MVC structure.
- Host: GitHub
- URL: https://github.com/shoaibrayeen/profile-creation-application
- Owner: shoaibrayeen
- License: apache-2.0
- Created: 2020-07-14T14:41:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T06:30:16.000Z (about 2 years ago)
- Last Synced: 2025-06-08T02:07:51.494Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 224 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: readMe.md
- License: LICENSE
Awesome Lists containing this project
README
## Profile Creation Application
### Overview
- Profiles are user accounts which are created to save information regarding users to server them better in a system. Generally it compromised with APIs to get/create/update profiles of users.### Getting Started with Application
Prerequisite
- Node.js Version 10
- RedisClone the repository
```sh
> git clone https://github.com/shoaibrayeen/Profile-Creation-Application
> cd Profile-Creation-Application/Profile Management System
```Setting up with MySQL
```
# Create a database user with your MySQL Terminal
for example, if user is root.
mysql -u root -p
password
and then
mysql> use PMS; //Use Database Name;
mysql> Create Tables mentioned in query.sql ( Can copy Create Table command directly)
Now update user, password and database in `db/connection.js` file. Alternatively, you can create database and create tables using one timer.
```
Install required dependencies
```sh
> npm install
```
Starting with App
```
npm start
# Now go to your browser and run
localhost:3000
# Your app is running
```To Use Model
```sh
# To see all the database using MySQL
> mysql -u root -p
mysql >>> use DATABASE_NAME;
mysql >>> SELECT * FROM TABLE_NAME;
mysql > describe users;
+------------+--------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+-------------------+-----------------------------+
| username | varchar(500) | NO | PRI | NULL | |
| name | varchar(100) | NO | | NULL | |
| email | varchar(500) | NO | UNI | NULL | |
| contact | varchar(500) | NO | UNI | NULL | |
| created_at | datetime | NO | | CURRENT_TIMESTAMP | |
| updated_at | datetime | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
+------------+--------------+------+-----+-------------------+-----------------------------+mysql > describe credentials;
+------------+--------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+-------------------+-----------------------------+
| username | varchar(500) | NO | PRI | NULL | |
| password | varchar(500) | NO | | NULL | |
| status | varchar(10) | NO | | active | |
| created_at | datetime | NO | | CURRENT_TIMESTAMP | |
| updated_at | datetime | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
+------------+--------------+------+-----+-------------------+-----------------------------+```
To Use Postman API
```sh
# After Starting Server
# Go to POSTMAN APP
GET localhost:3000/ping #checks info
POST localhost:3000/users/ping #check user info
POST localhost:3000/users # pass info in body to create user
```### Starting From Scratch
```sh
# after installing node.js, mysql server, redis and npm$ mkdir demo
$ cd demo
$ touch server.js
$ npm init
$ npm install express-generator -g # to create demo app
$ add dependency acc to your requirements
$ make a ping routes and check if it's working or not
$ npm start
# check on the browser
localhost:3000/ping
```
### License
[](http://www.apache.org/licenses/)**Copyright (c) 2020-2021 Mohd Shoaib Rayeen**
This project is licensed under the Apache License - see the LICENSE file for details