Skip to content

catdarick/NewsServer

Repository files navigation

NewsServer

NewsServer is HTTP server that implements REST backend API. It provides service with typical news site functionality.

Installing

Previously you must install libpq-dev package.

git clone https://github.com/catdarick/NewsServer
cd NewsServer
stack install
mkdir -p /home/$USER/configs && cp ./templates/server.cfg $_

Usage

Set PostgreSQL connection info in /home/<user>/configs/server.cfg.

# Create tables in PostgreSQL database
# Needs to be done once
NewsServer-exe -i

#Create admin account if it's necessary
NewsServer-exe -a login password firstName lastName

# Run server
NewsServer-exe

Api

Registration and Authentication

Closed endpoints require a valid Token to be included in the header of the request. A Token can be acquired from the Login view above.

Get methods

Each endpoint displays information related to some entity

Create methods

Each endpoint displays information related to some entity

Edit methods

Each endpoint displays information related to some entity

Delete methods

Each endpoint displays information related to some entity

About

Simple haskell news server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published