-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 81df50d
Showing
22 changed files
with
14,142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
frontend/node_modules | ||
|
||
backend/node_modules | ||
backend/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "backend", | ||
"version": "1.0.0", | ||
"main": "server.js", | ||
"author": "muskaanshraogi", | ||
"license": "MIT", | ||
"scripts": { | ||
"start": "nodemon server.js" | ||
}, | ||
"dependencies": { | ||
"body-parser": "^1.19.0", | ||
"dotenv": "^8.2.0", | ||
"express": "^4.17.1", | ||
"mysql": "^2.18.1", | ||
"path": "^0.12.7" | ||
}, | ||
"devDependencies": { | ||
"nodemon": "^2.0.6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const express = require('express') | ||
const path = require('path') | ||
const mysql = require('mysql') | ||
const dotenv = require('dotenv') | ||
|
||
dotenv.config() | ||
|
||
let app = express() | ||
|
||
let PASSWORD = process.env.PASSWORD || '' | ||
const connection = mysql.createConnection({ | ||
host: 'localhost', | ||
user: process.env.USER, | ||
password: PASSWORD, | ||
}) | ||
|
||
connection.connect((error) => { | ||
if(error) { | ||
console.log(error) | ||
} | ||
else { | ||
console.log('Connected to MySQL...') | ||
} | ||
}) | ||
|
||
const PORT = process.env.PORT || 8000 | ||
app.listen(PORT, () => { | ||
console.log(`Server up on port ${PORT}`) | ||
}) |
Oops, something went wrong.