Closed jessamarie closed 7 years ago
@jessamarie Have you run your seed file yet?
@AWhitleyGA When I do that I get this error in the terminal:
[jessa@Jessicas-MacBook-Pro recall-api]$ heroku run npm run seed
▸ heroku-cli: update available from 6.13.10 to 6.14.21-d83c94b
Running npm run seed on ⬢ recall-app-api... up, run.3062 (Free)
> recall-api@1.0.0 seed /app
> node config/db/seed.js
(node:18) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client
(node:18) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
{ MongoError: failed to connect to server [undefined:27017] on first connect [MongoError: getaddrinfo ENOTFOUND undefined undefined:27017]
at Pool.<anonymous> (/app/node_modules/mongodb-core/lib/topologies/server.js:336:35)
at emitOne (events.js:96:13)
at Pool.emit (events.js:188:7)
at Connection.<anonymous> (/app/node_modules/mongodb-core/lib/connection/pool.js:280:12)
at Connection.g (events.js:292:16)
at emitTwo (events.js:106:13)
at Connection.emit (events.js:191:7)
at Socket.<anonymous> (/app/node_modules/mongodb-core/lib/connection/connection.js:187:49)
at Socket.g (events.js:292:16)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at connectErrorNT (net.js:1021:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
name: 'MongoError',
message: 'failed to connect to server [undefined:27017] on first connect [MongoError: getaddrinfo ENOTFOUND undefined undefined:27017]' }
@jessamarie What file is this require statement supposed to be pointing at? https://github.com/jessamarie/recall-api/blob/master/config/db/connect.js#L4
API repo: https://github.com/jessamarie/recall-api
I've created an API to fetch data from. It's all working locally, but I am having trouble properly deploying it. Here are the steps I have taken:
MONGOLAB_URI="mongodb://<myactualuser>:<myactualpassword>@ds135624.mlab.com:35624/recall_prod"
process.env.MONGOLAB_URI
, as shown here: https://github.com/jessamarie/recall-api/blob/master/config/env/production.jsgit push heroku deploying:master
https://recall-app-api.herokuapp.com/api/topics should display an array of objects, but instead I get an error that says: "Application error. An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details."
Build log: