Code Monkey home page Code Monkey logo

Comments (11)

lishine avatar lishine commented on May 20, 2024 1

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.

crsandeep avatar crsandeep commented on May 20, 2024 1

@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.

malas avatar malas commented on May 20, 2024

@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.

lishine avatar lishine commented on May 20, 2024

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.

malas avatar malas commented on May 20, 2024

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.

nikodunk avatar nikodunk commented on May 20, 2024

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.

sierra-kilo avatar sierra-kilo commented on May 20, 2024

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.

lishine avatar lishine commented on May 20, 2024

Async await works with the new versions of node.

from simple-react-full-stack.

ernestpascual avatar ernestpascual commented on May 20, 2024

@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.

ernestpascual avatar ernestpascual commented on May 20, 2024

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.

stale avatar stale commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.