Skip to content

vladnicoara/liveblog-server

 
 

Repository files navigation

Live Blog Server Build Status

Live Blog Server provides a REST API server for Live Blog project. It's a python app, built on top of eve/flask framework.

Some basic infrastructure and apps(authentication, users, archive, notifications, activity, preferences) are used from Superdesk project. The application is focused implementing the Live Blog custom apps like blog management, blog posts and ingest from different sources.

Requirements

We support python version 3.3+.

Other requirements are mongodb server and elasticsearch instance. Both can be configured via environment variables (see settings.py).

Installation

Using virtualenv is recommended for installing python requirements. So once activated, run:

$ pip install -r requirements.txt

External libs

For image processing you will need some extra packages:

Services

  • mongodb
  • elasticsearch
  • redis

Running application and all services inside Docker containers with Fig

Fig is configured to create and start Docker container not only for Superdesk application itself but also for the depended services (mongodb, redis, elasticsearch). It will mount git repo root inside the container so all the local changes will be reflected there. So after running this command server will start listening on localhost:5000 for REST API and on localhost:5100 for WebSockets:

$ fig up

To create user you can run that command (it will start container instance for command execution and start depended service if needed):

fig run web python3 manage.py users:create -u admin -p admin -e "[email protected]" --admin=true

To rebuild container (ie in case of changes to environment or dependencies):

fig stop && fig build && fig up

For more commandline magic go to their docs: http://www.fig.sh/cli.html

CI

Use nosetests for unit tests:

$ nosetests

Behave for behaviour testing:

$ behave

Flake8 for style check:

$ flake8

Running Dev Server

Use honchu to run the app - it will start api server on port 5001 and websocket server on port 5101.

$ honcho start

API Documentation

You can see API Documentation on apiary.

Running cli commands

$ python manage.py

This will give you list of available commands.

Creating admin user

This command will create an administrator user.

$ python manage.py users:create -u <username> -p <password> -e <email>

About

No description, website, or topics provided.

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
LICENSE
GPL-3.0
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.1%
  • HTML 2.0%
  • Shell 0.9%