initial commit 2
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
7c233aedd0
commit
e6e5d41264
|
@ -0,0 +1,11 @@
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: node
|
||||||
|
commands:
|
||||||
|
- npm install
|
||||||
|
- npm test
|
||||||
|
publish:
|
||||||
|
image: plugins/docker
|
||||||
|
repo: drone/node-demo
|
||||||
|
secrets: [ docker_username, docker_password ]
|
||||||
|
dry_run: true # remove this to publish
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directory
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
|
@ -0,0 +1,11 @@
|
||||||
|
var express = require('express');
|
||||||
|
var app = express();
|
||||||
|
app.get('/', function (req, res) {
|
||||||
|
res.status(200).send('ok');
|
||||||
|
});
|
||||||
|
var server = app.listen(3000, function () {
|
||||||
|
var port = server.address().port;
|
||||||
|
console.log('Example app listening at port %s', port);
|
||||||
|
});
|
||||||
|
module.exports = server;
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
var request = require('supertest');
|
||||||
|
describe('loading express', function () {
|
||||||
|
var server;
|
||||||
|
beforeEach(function () {
|
||||||
|
server = require('./server');
|
||||||
|
});
|
||||||
|
afterEach(function () {
|
||||||
|
server.close();
|
||||||
|
});
|
||||||
|
it('responds to /', function testSlash(done) {
|
||||||
|
request(server)
|
||||||
|
.get('/')
|
||||||
|
.expect(200, done);
|
||||||
|
});
|
||||||
|
it('404 everything else', function testPath(done) {
|
||||||
|
request(server)
|
||||||
|
.get('/foo/bar')
|
||||||
|
.expect(404, done);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue