Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore node_modules folder
node_modules/
28 changes: 28 additions & 0 deletions backend/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const express=require('express');
const mysql=require('mysql');
const router=express.Router();

const db = mysql.createConnection({
host: "",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use environment variables.. See in other PR sent by nikhil.

user: "",
password: "",
database:""
});

db.connect((err)=> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is required.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

if (err) {

throw err;
}
console.log("Connected!");
});


const app=express();
app.use('/mycontest',require('./routes/mycontest'));



app.listen('3000',()=>{
console.log('connected');
});
Loading