Reputation: 13
Hey I'm having trouble connecting my Parse-Server to my Heroku app. I've been following this: https://github.com/parse-community/parse-server and I've done the first step for installing it locally by using npm install -g parse-server mongodb-runner
which worked fine. However, the following steps to set up my AppID, MasterKey and MongoDB databaseURI don't work. I have all of these things already as I've used parse-server-example, however running this command parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://localhost/test
with the correct information hasn't worked for me, and I don't know what file to put my keys in. If someone could help me that would be very much appreciated as I just went in circles on this for 9+ hours today.
Thank you!
Upvotes: 0
Views: 185
Reputation: 1239
You should put your keys in index.js
file. To run parse server locally, you need to use node index.js
in your command line.
If you want to connect to heroku, you need to make a Procfile
(simply touch Procfile
), then add web: npm start
into the file.
After you push to Heroku, go to settings, reveal config vars, then put all your keys there.
Both DATABASE_URI
and MONDODB_URI
should be your mongodb url(not local). SERVER_URL
should be the heroku app url.
Upvotes: 0