werckerを使用しようとしていますが、テストで mongodb に接続できないことがわかりません。
私は帆+帆モンゴを使用しています.npmテスト...私は常にエラーが発生し、モンゴDBに接続できます.これは私のwercker.ymlです:
box: nodesource/trusty:0.12.7
services:
- id: mongo:2.6
# Build definition
build:
# The steps that will be executed on build
steps:
- script:
name: set NODE_ENV
code: export NODE_ENV=development
# A step that executes `npm install` command
- npm-install
# A step that executes `npm test` command
- npm-test
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
- script:
name: echo nodejs information
code: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
これは私のエラーメッセージです:
warn: `sails.config.express` is deprecated; use `sails.config.http` instead.
Express midleware for passport
error: A hook (`orm`) failed to load!
1) "before all" hook
2) "after all" hook
0 passing (2s)
2 failing
1) "before all" hook:
Uncaught Error: Failed to connect to MongoDB. Are you sure your configured Mongo instance is running?
Error details:
{ [MongoError: connect ECONNREFUSED] name: 'MongoError', message: 'connect ECONNREFUSED' }
at net.js:459:14
2) "after all" hook:
Uncaught Error: Failed to connect to MongoDB. Are you sure your configured Mongo instance is running?
Error details:
{ [MongoError: connect ECONNREFUSED] name: 'MongoError', message: 'connect ECONNREFUSED' }
at net.js:459:14