我将其用作bitbucket-pipelines.yml
:
image: spittet/node-mongodb
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- npm install
- service mongod start
- npm test
在测试中我连接到mongo db。 像这样:
const localhost = process.env.HOSTNAME || "localhost";
mongoose.connect('mongodb://'+localhost+'/testslab');
但这不起作用。我应该如何连接到bitbucket管道mongo db?我应该使用什么主机?