diff --git a/.gitignore b/.gitignore index aea26dd2..38dc4ee1 100755 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 187e7bdb..00000000 --- a/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM node:16.13 -WORKDIR /usr/src/app -COPY . /usr/src/app -RUN npm install -RUN npm run build -EXPOSE 3000 -ENTRYPOINT ["npm", "start"] - diff --git a/client/assets/.SQLfile.gif.icloud b/client/assets/.SQLfile.gif.icloud deleted file mode 100644 index 782d79dc..00000000 Binary files a/client/assets/.SQLfile.gif.icloud and /dev/null differ diff --git a/client/pages/Login.tsx b/client/pages/Login.tsx index b44612a1..3d2dbd14 100644 --- a/client/pages/Login.tsx +++ b/client/pages/Login.tsx @@ -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); }; /* diff --git a/client/pages/Signup.tsx b/client/pages/Signup.tsx index a5d06e38..502da8a8 100644 --- a/client/pages/Signup.tsx +++ b/client/pages/Signup.tsx @@ -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 + ); }; /* diff --git a/dockerfile b/dockerfile new file mode 100644 index 00000000..daec4517 --- /dev/null +++ b/dockerfile @@ -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"] \ No newline at end of file diff --git a/package.json b/package.json index ea3eda01..977c12c9 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/server/controllers/dataController.js b/server/controllers/dataController.js index b2f0b245..1e3512c6 100644 --- a/server/controllers/dataController.js +++ b/server/controllers/dataController.js @@ -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) { @@ -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); @@ -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; }