0

error message on the page

An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.   

I have saw several questions like mine,

Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)

Heroku code=H10 desc="App crashed" - Can't figure out why it's crashing

but I don't think I made the same mistake.

const express = require('express');
const app = express();
const wetalk = require('./app');
const passport = require('passport');

app.set('port', process.env.PORT || 3000);
app.use(express.static('public'));
app.set('view engine', 'ejs');

app.use(wetalk.session);

app.use(passport.initialize());
app.use(passport.session());

app.use(require('morgan')('combined', {
    stream: {
        write: message => {
            //write to logs 
            wetalk.logger.log('info', message);
        }
    }
}));
//router
app.use('/', wetalk.router);


wetalk.ioServer(app).listen(app.get('port'), () => {
    console.log('Wetalk running on the port', app.get('port'));
});

Here below is my console on git push heroku master

 Counting objects: 3, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 309 bytes | 0 bytes/s, done.
    Total 3 (delta 2), reused 0 (delta 0)
    remote: Compressing source files... done.
    remote: Building source:
    remote:
    remote: -----> Node.js app detected
    remote:
    remote: -----> Creating runtime environment
    remote:
    remote:        NPM_CONFIG_LOGLEVEL=error
    remote:        NPM_CONFIG_PRODUCTION=true
    remote:        NODE_VERBOSE=false
    remote:        NODE_ENV=production
    remote:        NODE_MODULES_CACHE=true
    remote:
    remote: -----> Installing binaries
    remote:        engines.node (package.json):  4.2.2
    remote:        engines.npm (package.json):   unspecified (use default)
    remote:
    remote:        Downloading and installing node 4.2.2...
    remote:        Using default npm version: 2.14.7
    remote:
    remote: -----> Restoring cache
    remote:        Loading 2 from cacheDirectories (default):
    remote:        - node_modules
    remote:        - bower_components (not cached - skipping)
    remote:
    remote: -----> Building dependencies
    remote:        Installing node modules (package.json)
    remote:
    remote: -----> Caching build
    remote:        Clearing previous node cache
    remote:        Saving 2 cacheDirectories (default):
    remote:        - node_modules
    remote:        - bower_components (nothing to cache)
    remote:
    remote: -----> Build succeeded!
    remote: -----> Discovering process types
    remote:        Procfile declares types     -> (none)
    remote:        Default types for buildpack -> web
    remote:
    remote: -----> Compressing...
    remote:        Done: 15.5M
    remote: -----> Launching...
    remote:        Released v14
    remote:        https://we-talk-cds.herokuapp.com/ deployed to Heroku
    remote:
    remote: Verifying deploy... done.
    To https://git.heroku.com/we-talk-cds.git
       d9bfd0f..a10aa13  master -> master

this is what show on the console, seems correct any help is appreciated

pyy
  • 915
  • 3
  • 9
  • 25

1 Answers1

0

Check your logs. You're using Papertrail.

ShadowFax
  • 391
  • 2
  • 11