DevMata / jsonapi

A basic JSON API for a blog server with NodeJS and PostgreSQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BLOG JSON API

JSON API implemented with Typescript. Allows to manage anonymous blogs and their comments.

Start

  1. run npm install
  2. restore database from database.sql file in project folder
  3. Use .envexample as guide to connect to PostgreSQL
  4. run npm run compile
  5. run npm run start

Considerations

  • Endpoint of blogs is localhost:3000/blogs/:id
  • Endpoint of comments is localhost:3000/blogs/:id/comments/:id
  • API only allows JSON

API examples

Examples of the usage of the API can be found as Postman documentation here

About

A basic JSON API for a blog server with NodeJS and PostgreSQL


Languages

Language:TypeScript 98.2%Language:Shell 1.8%