Skip to content

admin get route modified#36

Open
hetvi955 wants to merge 2 commits intointegfrom
queries-optimisation
Open

admin get route modified#36
hetvi955 wants to merge 2 commits intointegfrom
queries-optimisation

Conversation

@hetvi955
Copy link
Copy Markdown

No description provided.

@hetvi955 hetvi955 linked an issue Oct 14, 2020 that may be closed by this pull request
Comment thread index.js Outdated

const app = express()
const port = process.env.PORT || 3001
const port = process.env.PORT || 3000
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.

Why 3000 here?

Comment thread index.js Outdated
app.use(express.json());
app.use(morgan('dev'));
app.use(express.static('public/build'))
//app.use(express.static('public/build'))
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.

Why have you commented out the static directory ?

Comment thread index.js Outdated

app.use(function(req, res){
res.sendFile('public/build/index.html', {root: __dirname});
res.sendFile('public/public/index.html', {root: __dirname});
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.

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?

Comment thread public/package.json
"name": "bonafide-system",
"version": "0.1.0",
"private": true,
"homepage": "/",
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.

Rebase the changes once

Comment thread routers/admin.js
no_copies: ele.getDataValue('no_copies')

})
sendResponse(ele);
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.

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

Copy link
Copy Markdown
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
Copy Markdown
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