koopjs / koop-app-example

A Koop express application example with some common providers.
Other
23 stars 35 forks source link

crashes on deploy to heroku #27

Closed ungoldman closed 8 years ago

ungoldman commented 8 years ago

log:

015-09-21T23:35:20.950195+00:00 heroku[web.1]: Starting process with command `npm start`
2015-09-21T23:35:23.926042+00:00 app[web.1]: > koop-sample-app@1.0.3 start /app
2015-09-21T23:35:23.926023+00:00 app[web.1]:
2015-09-21T23:35:23.926044+00:00 app[web.1]: > node server.js
2015-09-21T23:35:23.926045+00:00 app[web.1]:
2015-09-21T23:35:24.094709+00:00 app[web.1]: WARNING: NODE_ENV value of 'production' did not match any deployment config file names.
2015-09-21T23:35:24.095773+00:00 app[web.1]: WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
2015-09-21T23:35:26.181192+00:00 app[web.1]: warn: Plugin "Socrata" missing type property. Defaulting to provider.
2015-09-21T23:35:26.191666+00:00 app[web.1]: info: registered provider: Github 1.0.1
2015-09-21T23:35:26.193359+00:00 app[web.1]: info: registered provider: Gist 1.1.1
2015-09-21T23:35:26.208400+00:00 app[web.1]: Express koop server listening on port 42972
2015-09-21T23:35:26.199441+00:00 app[web.1]: info: registered provider: agol 1.4.3
2015-09-21T23:35:26.179668+00:00 app[web.1]: info: registered cache: postgis 1.3.1
2015-09-21T23:35:26.185257+00:00 app[web.1]: info: registered provider: Socrata 1.0.1
2015-09-21T23:35:26.185370+00:00 app[web.1]: warn: Plugin "ckan" missing type property. Defaulting to provider.
2015-09-21T23:35:26.187934+00:00 app[web.1]: info: registered provider: ckan (version missing)
2015-09-21T23:35:26.188045+00:00 app[web.1]: warn: Plugin "Github" missing type property. Defaulting to provider.
2015-09-21T23:35:26.188302+00:00 app[web.1]: No Github Token in config. This may cause problems accessing data.
2015-09-21T23:35:26.192456+00:00 app[web.1]: warn: No Github token in config for Gist provider. This may cause problems accessing data.
2015-09-21T23:35:26.193461+00:00 app[web.1]: warn: Plugin "agol" missing type property. Defaulting to provider.
2015-09-21T23:35:26.202445+00:00 app[web.1]: info: Koop 2.8.2 mounted at /
2015-09-21T23:35:26.209961+00:00 app[web.1]: Could not connect to the database: connect ECONNREFUSED
2015-09-21T23:35:26.964591+00:00 heroku[web.1]: Process exited with status 0

There's no database there so it falls down right away. Might be better to either use local cache out of the box, or to provide specific instructions on connecting koop to a Heroku Postgres database with PostGIS enabled (still experimental).

jgravois commented 8 years ago

i took a look at this today, and even after referencing an IN_MEMORY cache and confirming that the app runs fine on my local machine, i can confirm that a heroku instance crashes immediately, which is strange because it used to just work

i created a branch, but the logs are pretty uninformative so i'm going to have to chew on this to try and figure out what to do next.

jgravois commented 8 years ago

nm: i made a few more tweaks (including renaming index.js to > server.js and finally have a working push button deployment.

https://fast-springs-50571.herokuapp.com/github/chelm/grunt-geo/forks

ungoldman commented 8 years ago

why would renaming index.js to server.js make a difference? package.json points to index.js afaict

jgravois commented 8 years ago

i changed the command associated with npm start too because i saw an error in a heroku log that 'server.js couldn't be found'.

seems weird to me. i would expect either to work. but out of 4 deployments, only fast-springs is spitting back .geojson.

ungoldman commented 8 years ago

weird. I'm guessing a lot has changed since I was kooping. thanks for staying on it @jgravois

:star: :star: :star: :star: :star: