Giter Site home page Giter Site logo

Comments (5)

krothenbaum avatar krothenbaum commented on July 20, 2024

I'm having a similar problem. What should the start script be for deployment to heroku?

from node-rest-api-boilerplate.

kylealwyn avatar kylealwyn commented on July 20, 2024

Sorry for the delay, just getting back from a weekend trip.

Couple of things here:

  1. Heroku is sort of a special case. Since it's not good practice to commit your .env file, Heroku suggests you use config variables. Screenshot below. This is in your Project > Settings tab. Config variables will be loaded into your environment and accessible at process.env.<KEY>

screen shot 2017-09-06 at 11 27 14 am

  1. I will change the npm scripts around to make them more clear. Something like:
  "dev": "nodemon",
  "build": "npm run clean && babel app -d build",
  "start": "npm run build && node build"

And in the Procfile, web: npm start will start the production build

Let me know if either of you have other questions.

from node-rest-api-boilerplate.

krothenbaum avatar krothenbaum commented on July 20, 2024

Thanks. I ended up figuring it out and forgot to update this. I completely spaced on the config vars on Heroku and was successful with "start": "node index.js". Thanks for the clean boilerplate really helped to streamline my project.

from node-rest-api-boilerplate.

kylealwyn avatar kylealwyn commented on July 20, 2024

Excellent 👍 Happy to hear it helped

from node-rest-api-boilerplate.

Tzikas avatar Tzikas commented on July 20, 2024

Thank you 👍

from node-rest-api-boilerplate.

Related Issues (4)

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.