Problems deploying on Heroku

Problems deploying on Heroku
0

#1

Hi there! I can’t deploy my Header Parser Microservice to Heroku. I already deployed the Timestamp Microservice (also by following some advices I found here in the forum) and everything went good.

Here is my code https://github.com/alodavi/header_parser_microservice/ or (to see it working) https://ide.c9.io/alodavi/requestheaderparsermicroservice.

The log file I get when deploying is this:

-----> Node.js app detected

-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_ENV=production
       NODE_MODULES_CACHE=true

-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version (latest stable) via semver.io...
       Downloading and installing node 5.11.1...
       Using default npm version: 3.8.6

-----> Restoring cache
       Skipping cache restore (new runtime signature)

-----> Building dependencies
       Installing node modules (package.json)
       [email protected] /tmp/build_03e8cea254243b0492e7a968cc9a89b2/alodavi-header_parser_microservice-525cc28
       └─┬ [email protected]
       ├─┬ [email protected]
       │ ├─┬ [email protected]
       │ │ └── [email protected]
       │ └── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├─┬ [email protected]
       │ └── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├─┬ [email protected]
       │ ├── [email protected]
       │ └── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├─┬ [email protected]
       │ └── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├─┬ [email protected]
       │ ├── [email protected]
       │ └── [email protected]
       ├── [email protected]
       ├── [email protected]
       ├─┬ [email protected]
       │ ├── [email protected]
       │ ├─┬ [email protected]
       │ │ ├── [email protected]
       │ │ └── [email protected]
       │ └── [email protected]
       ├── [email protected]
       ├─┬ [email protected]
       │ └── [email protected]
       ├── [email protected]
       └── [email protected]
       

-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)

-----> Build succeeded!
       └── [email protected]
       
 !     This app may not specify any way to start a node process
       https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type

-----> Discovering process types
       Procfile declares types     -> (none)
       Default types for buildpack -> web

-----> Compressing...
       Done: 12.1M
-----> Launching...
       Released v3
       https://headerparsernode.herokuapp.com/ deployed to Heroku

I have no clue, what it could be…


#2

Well, I can open the webpage and I get a response. So everything should work fine.


#3

I solved the issue by editing the package.json file. Instead of

“scripts”: {

        "run": "node index.js"
  
  
      },

I wrote:

“scripts”: {

        "start": "node index.js"
  
  
      },

And it worked :smiley: Now the it’s live at https://headerparsernode.herokuapp.com/