Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin get route modified #36

Open
wants to merge 2 commits into
base: integ
Choose a base branch
from
Open

admin get route modified #36

wants to merge 2 commits into from

Conversation

hetvi955
Copy link

No description provided.

@hetvi955 hetvi955 linked an issue Oct 14, 2020 that may be closed by this pull request
index.js Outdated
@@ -7,7 +7,7 @@ const path = require('path');
global.appRoot = path.resolve(__dirname);

const app = express()
const port = process.env.PORT || 3001
const port = process.env.PORT || 3000
Copy link
Member

Choose a reason for hiding this comment

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

Why 3000 here?

index.js Outdated
@@ -18,14 +18,14 @@ const { exit } = require('process');
app.use(cors())
app.use(express.json());
app.use(morgan('dev'));
app.use(express.static('public/build'))
//app.use(express.static('public/build'))
Copy link
Member

Choose a reason for hiding this comment

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

Why have you commented out the static directory ?

index.js Outdated


app.use('/api', apiRouter);
app.use('/login', loginRouter);

app.use(function(req, res){
res.sendFile('public/build/index.html', {root: __dirname});
res.sendFile('public/public/index.html', {root: __dirname});
Copy link
Member

Choose a reason for hiding this comment

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

This is linked with serving the files after building. It should not be modified unless the build folder is modified. Why did you change it though?

@@ -2,7 +2,6 @@
"name": "bonafide-system",
"version": "0.1.0",
"private": true,
"homepage": "/",
Copy link
Member

Choose a reason for hiding this comment

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

Rebase the changes once

no_copies: ele.getDataValue('no_copies')

})
sendResponse(ele);
Copy link
Member

Choose a reason for hiding this comment

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

Having the same body 3 times is taken care of in another PR.

Copy link
Member

@gigatesseract gigatesseract left a comment

Choose a reason for hiding this comment

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

Rebase your work once, to do away with formatting changes.
Also, can you specify one line comments at places where ive asked why?

@hetvi955
Copy link
Author

yep i will do the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize db queries
2 participants