An open API service indexing awesome lists of open source software.

https://github.com/explooosion/koa-postgres-example

This is an example for postgres with koa
https://github.com/explooosion/koa-postgres-example

example koa koa2 postgresql restful-api

Last synced: about 2 months ago
JSON representation

This is an example for postgres with koa

Awesome Lists containing this project

README

        

# koa-postgres-example

This is an example for postgres with koa.

## Installation

```bash
git clone https://github.com/explooosion/koa-postgres-example.git
```

```bash
yarn install
```

```bash
yarn dev
```

## RESTful

#### GET

- http://localhost
- http://localhost/user
- http://localhost/user/:id

#### PUT

- http://localhost/user

#### PATCH

- http://localhost/user/:id

#### DELETE

- http://localhost/user/:id

## Database

1. Install [PostgreSQL](https://www.postgresql.org/)
2. Install [pgAdmin](https://www.pgadmin.org/)
3. Import db [Database/mydb](https://github.com/explooosion/koa-postgres-example/blob/master/Database)

## Credits

- [koajs/koa](https://github.com/koajs/koa)
- [koa-deploy](https://github.com/explooosion/koa-deploy)
- [node-postgres](https://github.com/brianc/node-postgres)

## License

[MIT](https://opensource.org/licenses/MIT)