https://github.com/zonayedpca/nodemysqlphonebook
A Simple Phonebook App with MySQL, Node and Express JS
https://github.com/zonayedpca/nodemysqlphonebook
express mysql node
Last synced: about 1 year ago
JSON representation
A Simple Phonebook App with MySQL, Node and Express JS
- Host: GitHub
- URL: https://github.com/zonayedpca/nodemysqlphonebook
- Owner: zonayedpca
- Created: 2019-02-20T15:39:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-19T12:34:21.000Z (over 7 years ago)
- Last Synced: 2025-04-22T18:54:31.552Z (about 1 year ago)
- Topics: express, mysql, node
- Language: JavaScript
- Homepage: https://phonebookpca.herokuapp.com/
- Size: 208 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## About
It is basically a simple Node Express Web Application using MySQL as its Database.
## Install All the Dependencies
```
npm i
```
## Connect to the Database
You must have to connect this application to your MySQL Database using environment variables
## Create Tables
You have to create two tables. I have added the commands below so that yoy can create those tables yourself
### User Table:
```
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL
);
```
### Phones Table:
```
CREATE TABLE phones (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(250) NOT NULL,
phone VARCHAR(100) NOT NULL,
user_id INT NOT NULL,
FOREIGN KEY(user_id) REFERENCES users(id)
);
```
## Run development server
```
npm run dev
```
## Thanks
```
||||||||||| ||| ||| ||| ||| ||| ||| || ||||||||
||| ||| ||| ||||| ||||| ||| ||| || |||
||| ||||||||||| ||| ||| ||| ||||| ||||| |||
||| ||| ||| ||| ||| ||| |||| ||| || |||
||| ||| ||| ||| ||| ||| ||| ||| || ||||||||
```