fixed make file and added an example database

This commit is contained in:
didier.amyot committed 2014-10-30 22:22:47 -07:00
1 parent 32c9730321
commit 4ad71dd240
8 files changed
+62 -76

No files matched your search

+3 -1
View File
@@ -7,6 +7,7 @@ import (
"net/http"
"net/url"
"strconv"
"strings"
"github.com/gorilla/mux"
"gopkg.in/mgo.v2"
@@ -63,9 +64,10 @@ func (this *VultureBackend) GetDataBases() ([]string, error) {
dbs, err := this.Client.DatabaseNames()
if err == nil {
return dbs, nil
} else if err.Error() == "unauthorized" {
} else if strings.Contains(err.Error(), "authorized") {
return this.getDatabaseFromMongoURL()
} else {
fmt.Println(">>> ", err.Error())
return nil, err
}
}
-57
View File
@@ -1,57 +0,0 @@
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig(
packagekg: grunt.file.readJSON('package.json')
bower:
install:{}
shell:
bower:
command: "node_modules/.bin/bower install"
connect:
server:
options:
port: 4506
base: '.'
keepalive: true
clean:
compiledFiles: ["js"]
prod: [
"node_modules",
"bower_components/fontawesome/src",
]
coffee:
compile:
expand: true
cwd: 'coffee'
src: ['**/*.coffee']
dest: 'js'
ext: '.js'
watch:
coffee:
files: ['**/*.coffee']
tasks: ['coffee']
options:
spawn: false
concurrent:
target: ['watch', 'connect'],
)
# Plugins
grunt.loadNpmTasks('grunt-bower-task')
grunt.loadNpmTasks('grunt-contrib-connect')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-concurrent')
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-shell')
# tasks
grunt.registerTask('default', ['bower', 'clean:compiledFiles', 'coffee:compile'])
grunt.registerTask('prod', ['shell:bower', 'clean:compiledFiles', 'coffee:compile', 'clean:prod'])
grunt.registerTask('dev', ['default', 'concurrent:target'])
+4 -1
View File
@@ -11,7 +11,7 @@
"dependencies": {
"underscore": "~1.6.0",
"foundation": "~5.2.1",
"angular": "~1.2.14",
"angular": "1.3.x",
"angular-route": "~1.2.14",
"angular-local-storage": "~0.0.1",
"qunit": "~1.14.0",
@@ -25,5 +25,8 @@
"angular-spinner": "~0.4.0",
"highcharts-ng": "~0.0.6",
"highcharts": "~3.0.7"
},
"resolutions": {
"angular": "1.3.x"
}
}
+36
View File
@@ -0,0 +1,36 @@
var bower = require('gulp-bower');
var gulp = require('gulp');
var coffee = require('gulp-coffee');
var help = require('gulp-task-listing');
var clean = require('gulp-clean');
gulp.task('help', help);
gulp.task('bower', function() {
return bower()
.pipe(gulp.dest('bower_components/'))
});
gulp.task('coffee', function() {
gulp.src('coffee/**/*.coffee')
.pipe(coffee({bare: true}))
.pipe(gulp.dest('./js/'))
});
gulp.task('clean', function(){
return gulp.src(["js/", "bower_components/"], {read: false})
.pipe(clean())
});
gulp.task('default', ['bower', 'coffee']);
gulp.task('dev', ['bower', 'coffee'], function(){
gulp.watch('coffee/**/*.coffee', ['coffee']);
});
+2 -2
View File
@@ -10,7 +10,7 @@
<link rel="stylesheet" href="bower_components/foundation/css/foundation.css">
<link rel="stylesheet" href="bower_components/foundation/css/normalize.css">
<link rel="stylesheet" href="bower_components/fontawesome/css/font-awesome.min.css">
<link rel="stylesheet" href="bower_components/leaflet-dist/leaflet.css">
<link rel="stylesheet" href="bower_components/leaflet/dist/leaflet.css">
<link rel="stylesheet" type="text/css" href="bower_components/codemirror/lib/codemirror.css">
@@ -45,7 +45,7 @@
<div ng-view></div>
<script src="bower_components/leaflet-dist/leaflet.js"></script>
<script src="bower_components/leaflet/dist/leaflet.js"></script>
<script type="text/javascript" src="bower_components/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="bower_components/codemirror/mode/javascript/javascript.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
+6 -10
View File
@@ -1,13 +1,9 @@
{
"devDependencies": {
"grunt": "^0.4.4",
"grunt-contrib-connect": "^0.7.1",
"grunt-contrib-coffee": "^0.10.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-concurrent": "^0.5.0",
"grunt-contrib-clean": "^0.5.0",
"bower": "~1.3.0",
"grunt-bower-task": "^0.3.4",
"grunt-shell": "~0.7.0"
"dependencies": {
"gulp-task-listing": "~0.3.0",
"gulp-clean": "~0.3.1",
"gulp-coffee": "~2.2.0",
"gulp": "~3.8.9",
"gulp-bower": "0.0.7"
}
}
+6 -4
View File
@@ -1,13 +1,15 @@
prod:
cd client; npm install
cd client; grunt prod
cd client; node_modules/.bin/gulp
goxc
cd client; npm install
cd client; grunt
dev:
go get
go test
go build
cd client; npm install
cd client; grunt
cd client; node_modules/.bin/gulp
clean:
cd client; node_modules/.bin/gulp clean
rm -rf client/node_modules
+5 -1
View File
@@ -17,4 +17,8 @@ ServingAddress: 0.0.0.0
MongoServers:
-
name: localhost
url: localhost:27017
url: localhost:27017
-
name: vulture example
url: mongodb://vulture:vulture_example@ds047800.mongolab.com:47800/vulture_example