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
- Host: GitHub
- URL: https://github.com/explooosion/koa-postgres-example
- Owner: explooosion
- License: mit
- Created: 2018-06-17T10:38:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-17T11:00:08.000Z (almost 7 years ago)
- Last Synced: 2025-01-24T22:11:45.209Z (4 months ago)
- Topics: example, koa, koa2, postgresql, restful-api
- Language: JavaScript
- Size: 47.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)