-
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
const fs = require('fs') | ||
|
||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Why have you commented out the static directory ? |
||
|
||
|
||
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 commentThe 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? |
||
}); | ||
|
||
try { | ||
|
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?