-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: integ
Are you sure you want to change the base?
Conversation
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 |
There was a problem hiding this comment.
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')) |
There was a problem hiding this comment.
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}); |
There was a problem hiding this comment.
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": "/", |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this 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?
yep i will do the changes. |
No description provided.