Comments (11)
In order to deploy to Heroku, need to do this:
const PORT = process.env.PORT || 8080
app.listen(PORT, () => console.log('Listening on port 8080!'))
from simple-react-full-stack.
@lishine Good catch. Would be awesome if you could send a PR with these changes when you have some free time
from simple-react-full-stack.
@lishine could you explain a little bit more the additions you made to the configs?
for example nodemon -r
i can not even find documentation on this option
from simple-react-full-stack.
Look for esm package.You can write in node es6 but to us import . This enables us to use import instead of require. -r just runs it, i gess.
My webpack is a function of mode that I set with the command line. The other flags just help with some info.
Kill others. If one process exits then exit.
Take the port from the environment.
Anything else i can help?
from simple-react-full-stack.
thanks for such a quick response!
i have only started to refactor my project into this structure so more questions are yet to come.
from simple-react-full-stack.
In order to deploy to Heroku, need to do this:
const PORT = process.env.PORT || 8080
app.listen(PORT, () => console.log('Listening on port 8080!'))
Thanks for this! In order to deploy on Heroku, I needed to addionally do:
heroku config:set NPM_CONFIG_PRODUCTION=false
from simple-react-full-stack.
I'm having an issue with async / await. With your recent changes, is it supposed to support async / await with no other requirements on my end before writing an async function of do I need to do something else?
Module build failed (from ./node_modules/babel-loader/lib/index.js): Unexpected token, expected "("
from simple-react-full-stack.
Async await works with the new versions of node.
from simple-react-full-stack.
@lishine Good catch. Would be awesome if you could send a PR with these changes when you have some free time
i actually did just now!
from simple-react-full-stack.
In order to deploy to Heroku, need to do this:
const PORT = process.env.PORT || 8080
app.listen(PORT, () => console.log('Listening on port 8080!'))Thanks for this! In order to deploy on Heroku, I needed to addionally do:
heroku config:set NPM_CONFIG_PRODUCTION=false
You can also put
scripts": {
...
"heroku-prebuild": "npm install --dev",
...
}
in your package.json so heroku can install those dependencies
from simple-react-full-stack.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from simple-react-full-stack.
Related Issues (20)
- Do you need Docker support for this app? I can create docker-compose-dev file for development env, HOT 1
- Deploy to Heroku HOT 1
- error on npm run build
- what about the routes for front-end?? HOT 1
- is SSR a thing which could be possible here? HOT 1
- Just installed on my vps and dev mode doesnt work HOT 2
- SSR isomorphic app ? Google blank page ? HOT 1
- Client can access all app files HOT 2
- Deploying to NodeIIS HOT 2
- Serving static files (i.e. images...) from express
- Electron support HOT 1
- Express Route Not Found Proxy Not Working HOT 4
- ES6 support for server-side HOT 3
- Creating a build, but the API endpoints returns 404 error. HOT 1
- Just saying thanks. HOT 1
- Any advice on adding node-sass to the package? HOT 1
- License? HOT 1
- Move webpack to "dependencies" from "devDependencies" HOT 1
- Upgrade to webpack v5 HOT 1
- Error occurred while trying to proxy request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-react-full-stack.