-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
51 lines (41 loc) · 1.07 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
exec: {
create_db: 'createdb kalamata_sample',
create_db_user: 'createuser kalamata_sample_user',
drop_db: 'dropdb kalamata_sample',
drop_user: 'dropuser kalamata_sample_user',
knex_migrate: 'knex migrate:latest',
knex_seed: 'knex seed:run'
},
express: {
server: {
options: {
script: 'server.js',
port: 9999
}
}
},
watch: {
server: {
files: ['server.js'],
tasks: [ 'express']
}
}
});
grunt.registerTask('setup', [
'exec:create_db',
'exec:create_db_user',
'exec:knex_migrate',
'exec:knex_seed'
]);
grunt.registerTask('teardown', [
'exec:drop_db',
'exec:drop_user'
]);
grunt.registerTask('default', [
'express',
'watch'
]);
}