node.js - Missing Script: Start, Heroku Deployment Error -


my node.js script unable deployed heroku , error comes in console saying i'm missing start script though have it.

package.json

{   "name": "kash",   "version": "1.0.0",   "description": "",   "main": "app.js",   "scripts": {     "test": "echo \"error: no test specified\" && exit 1",     "start": "node app.js"   },   "author": "",   "license": "isc" } 

app.js

var express = require("express"); var request = require("request"); var bodyparser = require("body-parser");  var app = express(); app.use(bodyparser.urlencoded({extended: false})); app.use(bodyparser.json()); app.listen((process.env.port || 5000));  // server index page app.get("/", function (req, res) {   res.send("deployed!"); });  // facebook webhook // used verification app.get("/webhook", function (req, res) {   if (req.query["hub.verify_token"] === process.env.verification.token) {     console.log("verified webhook");     res.status(200).send(req.query["hub.challenge"]);   } else {     console.error("verification failed. tokens not match.");     res.sendstatus(403);   } }); 

console log screenshots:

screenshot 1

screenshot 2


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -