我正在設置一個NodeJS Heroku應用程序。我只想要一個空的應用程序啓動並運行。NodeJS應用程序使用Heroku構建,但它顯示應用程序錯誤
我的目錄包含一個package.json和一個app.js文件。
Heroku應用程序的構建沒有錯誤,但我剛剛在URL(https://nameless-wave-98692.herokuapp.com/)上得到一個「應用程序錯誤」頁面。
據我所看到的,一切都看起來很不錯的日誌:
-----> 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): 6.9.2
engines.npm (package.json): unspecified (use default)
Downloading and installing node 6.9.2...
Using default npm version: 3.10.9
-----> Restoring cache
Loading 2 from cacheDirectories (default):
- node_modules
- bower_components (not cached - skipping)
-----> Building dependencies
Installing node modules (package.json)
-----> Caching build
Clearing previous node cache
Saving 2 cacheDirectories (default):
- node_modules
- bower_components (nothing to cache)
-----> Build succeeded!
└── (empty)
! 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: 13.4M
-----> Launching...
Released v4
https://nameless-wave-98692.herokuapp.com/ deployed to Heroku
你看到什麼問題?難道我做錯了什麼?
請提供您的app.js – kkreft
app.js可以在這裏找到:http://pastebin.com/GhgQfKkJ – davidbograd