A simple blog API built using NodeJS + Express + Postgres.
$ npm install
DB_URL=postgres://user:password@host:port/database
$ npm run dev
Visit http://localhost:4002/api/v1
/api/v1/authors
method | route | description |
---|---|---|
POST | /authors | Create author |
/api/v1/posts
method | route | description |
---|---|---|
GET | /posts | Get posts |
POST | /posts | Create post |
GET | /posts/:id | Get posts by ID |
PUT | /posts/:id | Update posts |
DELETE | /posts/:id | Delete/remove posts |