Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,15 @@ dist/
# package-lock
package-lock.json

<<<<<<< HEAD
#EBStalk
.elasticbeanstalk/

.env
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
=======
.env
>>>>>>> 342d51b7256a6ae08cc11165302b8bca3999415a
8 changes: 0 additions & 8 deletions Dockerfile

This file was deleted.

Binary file removed client/assets/.SQLfile.gif.icloud
Binary file not shown.
7 changes: 1 addition & 6 deletions client/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ export default function Login() {
const google = () => {
const strWindowFeatures =
'toolbar=no, menubar=no, width=600, height=700, top=100, left=100';
window.open(
// '/auth/google',
'http://localhost:8080/auth/google',
'_self',
strWindowFeatures
);
window.open('http://localhost:8080/auth/google', '_self', strWindowFeatures);
};

/*
Expand Down
6 changes: 5 additions & 1 deletion client/pages/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export default function Signup() {
const google = () => {
const strWindowFeatures =
'toolbar=no, menubar=no, width=600, height=700, top=100, left=100';
window.open('/auth/google', '_self', strWindowFeatures);
window.open(
'https://dbspy.net/auth/google',
'_self',
strWindowFeatures
);
};

/*
Expand Down
8 changes: 8 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:16.3
WORKDIR /usr/src/app
COPY package.json /usr/src/app
RUN npm install
COPY . ./
RUN ["npm", "run", "build"]
EXPOSE 3000
ENTRYPOINT ["node", "./server/server.js"]
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"version": "1.0.0",
"description": "Visualizing existing database",
"main": "index.js",
"engines": {
"npm": "6.x",
"node": "16.x"
},
"scripts": {
"test2": "tldr curl",
"test": "jest",
Expand Down
7 changes: 5 additions & 2 deletions server/controllers/dataController.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ dataController.getSchema = (req, res, next) => {

// Option 2 - Dev
fs.readFile(
path.join(__dirname, '../db_schemas/vjcmcautvjcmcaut1657127402.sql'),
path.join(__dirname, '../db_schemas/rpvgbcdirpvgbcdi1660582287.sql'),
'utf8',
(error, data) => {
if (error) {
Expand Down Expand Up @@ -557,6 +557,8 @@ function parseTableName(name) {
}

function parseAlterTable(tableName, constraint) {


// const tableName = tmp.match(/(?<=ALTER\sTABLE\s)([a-zA-Z_]+)(?=\sADD\sCONSTRAINT)/)[0];

// console.log('tableName in parseAlterTable------>', tableName);
Expand Down Expand Up @@ -686,7 +688,8 @@ function parseSql(text) {
tname = tableList[i].Name;
}
}

//check for TableName and following line with constraint bound on database
if (tname !== null && lines[i+1] !== null)
parseAlterTable(tname, lines[i + 1]);
i += 3;
}
Expand Down