Start and Stop database services
This plugin requires Grunt.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-services --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-services');
All tasks are plain tasks, which means you have to include them in grunt.registerTask()
statements or call them directly from command line. The available tasks are:
- startRedis Start Redis database.
- startMongo Start Mongodb database.
- startPostgres Start Postgres database.
- stopRedis Stop Redis database.
- stopMongo Stop Mongodb database.
- stopPostgres Stop Postgres database.
Create start
and stop
aliases for starting and stoping the services:
grunt.initConfig({ /* ... */ });
grunt.registerTask('start', 'Start all required services', ['startRedis', 'startMongo']);
grunt.registerTask('stop', 'Stop all services', ['stopRedis', 'stopMongo']);
- v0.0.1, 15 Feb 2014
- Big Bang
Copyright (c) 2014 Thanasis Polychronakis. Licensed under the MIT license.