Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

256
Vistas
Connecting meteor apk to heroku / mLab db

This is my first post to the site. Your community has helped me solve so many problems in making my first Meteor application, but this is a problem I cannot seem to resolve after days of searching.

I have successfully deployed my app to heroku, using the mLab add on. I can see my app & mongo db working correctly in a web browser.

I am now trying to publish to android, and can successfully build and open my apk on my device. My problem is that I can't get past the log in screen on my app. I think this is because it can't connect to the mLab database.

What I am currently doing

I am building the apk using a command that looks like this:

$ meteor build /my/output/location --server mongodb://ds898989.mlab.com:898989/heroku_898989

Where I have changed the actual server address for 898989

Is this the correct information needed to access the database? Everything I've read here suggests that it is. Perhaps this not how you enter the host:port info for mLab. I have studied the docs here to get this address. The docs say I don't need to provide credentials in this URI, though I have tried both with and without my credentials with the same result. Is anyone able to give an example of what the server field should look like in this command when using a heroku/mLab database?

What I may be overlooking

I've read about setting the environment variables in settings.json, I have not done this since I believe these are all set in heroku. Do I need to set the information in this file to build to android? What should my settings.json file look like if I want my apk to connect to a heroku/mLab set up? So far my research has not yeilded any answers. Is anyone able to point me to an example settings.json file for a heroku/mLab set up?

What else?

I'm using the accounts templates package to handle my login. I can input data into the fields to create an account, but get no feedback at all when I press register. I have an alert() that displays an error message when the server reports and error with sign up (fired from the onSubmitHook in the AccountsTemplates package). I'd expect it to display this message if there was a database connection, so I'm reasonably confident the problem isn't with the login systems.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

After much fiddling I managed to solve this by changing the build command to look like :

$ meteor build /my/output/location --server http://myappp.herokuapp.com

I didn't need to provide an explicit port.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda