Giter Site home page Giter Site logo

Comments (5)

nikurou avatar nikurou commented on August 22, 2024 1

I ran into this issue too, but then I looked ahead in case a solution to my issue was addressed later on and it was.

However the command given on the course:
$ heroku config:set MONGODB_URI='mongodb+srv://fullstack:[email protected]/note-app?retryWrites=true'
Would simply result in this:
» Error: Missing required flag: » -a, --app APP app to run command against » See more help with --help 'w' is not recognized as an internal or external command, operable program or batch file.

Maybe some things changed with Heroku CLI since the tutorial was written (or more likely idk how to use Heroku CLI) but it took me like 30 minutes to make sense of the error. What ended up working for me was:

From the start in case you never set up Heroku CLI....
$heroku login
$heroku apps //in case you forgot app-name
$heroku config:set -a your-app-name MONGODB_URI='your_mongoDB_URI'

from fullstack-hy2020.github.io.

wulforr avatar wulforr commented on August 22, 2024

On moving forward with the course I saw that declaring environment variables in heroku is illustrated in part 3d but the app is already hosted on heroku in part 3b so students might deploy their app to heroku after part 3c and run into errors.(my case)
It would be better to illustrate heroku config right next to dotenv package

from fullstack-hy2020.github.io.

I-keep-trying avatar I-keep-trying commented on August 22, 2024

I came here to suggest this also. I finally got my phonebook app working (using heroku config:set ENV_VAR=password) after several days of frustration and googling, but for some weird reason I did not have the same problem with my notes app. Both databases are side-by-side, in the mongodb "Collections" in the same cluster. Both apps use the same exact versions of everything.

I did not want to move forward to the next section until I got this part all working. I must have deleted and re-created at least 10 heroku apps. Stackoverflow to the rescue!

from fullstack-hy2020.github.io.

sahilrajput03 avatar sahilrajput03 commented on August 22, 2024

Also heroku variables can be set manually via web heroku and that seems much better option to me.
Though command line always wins if you know the command you are looking for.
But if you are willing with website way - its done via going to Setttings page and then adding variable there -

image

from fullstack-hy2020.github.io.

mluukkai avatar mluukkai commented on August 22, 2024

this will be clarified in 2022 edition

from fullstack-hy2020.github.io.

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.