Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "pgnode", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "PostgresSQL client to Nodejs servers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -7,10 +7,55 @@ <p align="center"> | ||
<p align="center">Gostou o projeto? Por favor considere <a href="http://bit.ly/doarprarastrearpedidos">uma doação</a> para ajudar a melhorar! | ||
<p align="center"> | ||
<a href="https://github.com/hebertcisco/pgnode/issues"> | ||
<img alt="Issues" src="https://img.shields.io/github/issues/hebertcisco/pgnode?style=flat&color=336791" /> | ||
</a> | ||
<a href="https://github.com/hebertcisco/pgnode/pulls"> | ||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/hebertcisco/pgnode?style=flat&color=336791" /> | ||
</a> | ||
<a href="https://github.com/hebertcisco/pgnode/pulls"> | ||
<img alt="GitHub pull requests" src="https://img.shields.io/npm/dw/pgnode?style=flat&color=336791" /> | ||
</a> | ||
<br /> | ||
<br /> | ||
<a href="https://github.com/hebertcisco/musiko-app/issues/new/choose">Report Bug</a> | ||
<a href="https://github.com/hebertcisco/musiko-app/issues/new/choose">Request Feature</a> | ||
</p> | ||
**PostgresSQL client to Nodejs servers** ✨ | ||
Connect your database easily using the pgnode package | ||
<p align="center">Did you like the project? Please, considerate <a href="https://www.buymeacoffee.com/hebertcisco">a donation</a> to help improve!</p> | ||
<p align="center"><strong>PostgresSQL client to Nodejs servers</strong>✨</p> | ||
<p align="center">Connect your database easily using the pgnode package</p> | ||
# Getting started | ||
## Installation | ||
To install the module in your project just run the command below: | ||
```bash | ||
npm i pgnode | ||
``` | ||
or | ||
```bash | ||
yarn add pgnode | ||
``` | ||
Now in your project just import the module like this: | ||
```js | ||
const pg = require("pgnode"); | ||
``` | ||
Or you can use import: | ||
```js | ||
import pg from "pgnode"; | ||
``` | ||
## Use | ||
This is the simplest possible way to connect, query, and disconnect with async/await: | ||
@@ -41,2 +86,3 @@ | ||
# Features | ||
@@ -55,41 +101,1 @@ | ||
- make pg.Pool an es6 class | ||
# Commands | ||
- `npm run clean` - Removes the directory `lib/` | ||
- `npm test` -Performs tests with linting and coverage results. | ||
- `npm test:only` - Performs tests without linting or coverage. | ||
- `npm test:watch` - You can even run the hotreload tests again! | ||
- `npm test:prod` - Run tests with minified code. | ||
- `npm run test:examples` - Test examples written in pure JS to better understand the use of the module. | ||
- `npm run lint` - Run ESlint with airbnb-config | ||
- `npm run cover` - Get a code coverage report | ||
- `npm run build` - Babel will transpile ES6 => ES5 and minify the code. | ||
- `npm run prepublish` - Hook to npm. It will do all the checks before publishing your module. | ||
# Installation | ||
To install the module in your project just run the command below: | ||
```bash | ||
npm i pgnode | ||
``` | ||
or | ||
```bash | ||
yarn add pgnode | ||
``` | ||
Now in your project just import the module like this: | ||
```js | ||
const pg = require("pgnode"); | ||
``` | ||
Or you can use import: | ||
```js | ||
import pg from "pgnode"; | ||
``` |
69527
99