-
Notifications
You must be signed in to change notification settings - Fork 0
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
Setup/basic server deployment #23
Conversation
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.
Just had a couple of little comments on the code that I left there!
@@ -6,7 +6,16 @@ | |||
"react": "^16.8.6", | |||
"react-dom": "^16.8.6", | |||
"react-scripts": "2.1.8", | |||
"styled-components": "^4.2.0" | |||
"styled-components": "^4.2.0", |
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.
Is this what you mentioned about eslint needing to be a dependency?
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.
no, styled-components
is a package that we discuss to use instead of CSS directly.
those some of the dependances that makes the build errors eslint-plugin-import
, eslint-plugin-jsx-a11y
an example error at heroku build log:
Creating an optimized production build...
Failed to compile.
./src/index.js
Error: Failed to load plugin import: Cannot find module 'eslint-plugin-import'
Referenced from:
at Array.forEach (<anonymous>)
at Array.reduceRight (<anonymous>)
@@ -2,12 +2,15 @@ | |||
"name": "commons", |
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.
Could you please explain why we have to have two package.jsons? I see that it is because we have the client folder, but don't quite understand why we need it. I haven't seen that before. Thanks!
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.
creat-react-app
run internally on a separate server and also need to run it scripts and make a node environment. (it's like this server for the front)
localhost:3000
node-server
is the other one. localhost:5000
when u work on express and react ( actually u work on two servers)
each one has his own environments and dependances
|
||
const port = process.env.PORT || 5000; | ||
|
||
app.listen(port, () => console.log(`App listen on port ${port}`)); |
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.
Thank god for express! 😊 Looks great!
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.
Thanks for the explanations. Looks good to me.
relates #10