Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Grunt plugin to help with administering Postgres.
If you haven't used grunt before, be sure to check out the Getting Started guide.
From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:
npm install --save-dev grunt-pg
Once that's done, add this line to your project's Gruntfile:
grunt.loadNpmTasks('grunt-pg');
If the plugin has been installed correctly, running grunt --help
at the command line should list the newly-installed
plugin's task or tasks. In addition, the plugin should be listed in package.json as a devDependency
, which ensures
that it will be installed whenever the npm install
command is run.
There are 5 tasks in grunt-pg: pgcreateuser, pgdropuser, pgcreatedb, pgowner and pgdropdb.
Each works similarly as the example below shows. The connection credentials must be a user who is privieleged enough to be able to perform these operations. For example, using the 'postgres' user to the 'template1' database should be sufficient.
Firstly, an example of using the pgcreate task:
grunt.initConfig({
pgcreatedb: {
project1: {
// Target-specific file lists and/or options go here.
name: 'project1', // will be created
connection: {
user: 'postgres',
database: 'template1',
},
},
},
})
The connection object can also specify anything that node-pg understands: user, database, password, port and host.
Each task also requires the following:
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
2013-01-16: 0.1.0 -
Andrew Chilton.
Copyright (c) 2013 Moneytribe. MIT.
FAQs
Grunt plugin to help with administering Postgres.
The npm package grunt-pg receives a total of 9 weekly downloads. As such, grunt-pg popularity was classified as not popular.
We found that grunt-pg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.