Go to file
2019-05-27 10:45:32 +02:00
bin preparing repo persistence for fast startups and more fault tolerance 2015-06-30 11:22:30 +02:00
client replaced logger, fixed update queue mechanism 2019-05-23 14:20:38 +02:00
content commented out unused RepoNode constructor, updated pprof 2019-05-22 09:52:58 +02:00
graphics updated graphics and readme 2019-05-27 10:23:28 +02:00
logger replaced logger, fixed update queue mechanism 2019-05-23 14:20:38 +02:00
metrics working on prometheus dashboard 2019-05-23 17:51:20 +02:00
pkg flattened project structure and listened to golint 2016-03-07 15:36:34 +01:00
prometheus working on prometheus dashboard 2019-05-23 17:51:20 +02:00
repo added flags to testclient, added optional getrepo call 2019-05-24 17:40:26 +02:00
requests added DataFields to content request 2018-11-28 11:56:11 +01:00
responses Fixes #5: added status 500 to each error reply + pumped version number 2016-05-19 17:15:44 +02:00
server updated graphics and readme 2019-05-27 10:23:28 +02:00
status working on prometheus dashboard 2019-05-23 17:51:20 +02:00
testing cleanup 2019-05-24 17:45:44 +02:00
.gitignore working on prometheus dashboard 2019-05-23 17:51:20 +02:00
.travis.yml feat: add prometheus handler and go-modules 2019-05-08 17:51:51 +02:00
contentserver.go updated graphics and readme 2019-05-27 10:23:28 +02:00
contentserver.graffle updated graphics and readme 2019-05-27 10:23:28 +02:00
Dockerfile loglevel removed from Dockerfile 2019-05-24 15:02:15 +02:00
go.mod updated deps 2019-05-21 12:36:06 +02:00
go.sum updated deps 2019-05-21 12:36:06 +02:00
LICENSE Initial commit 2013-12-26 15:37:02 -08:00
Makefile refactored repo to reuse a bytes.Buffer for updates, to reduce the number of allocations 2019-05-24 13:00:28 +02:00
README.md removed links 2019-05-27 10:45:32 +02:00

Travis CI

Content Server

Serves content tree structures very quickly through a json socket api

Concept

A Server written in GoLang to mix and resolve content from different content sources, e.g. CMS, Blog, Shop and many other more. The server provides a simple to use API for non blocking content repository updates, to resolve site content by an URI or to get deep-linking multilingual URIs for a given contentID.

It's up to you how you use it and which data you want to export to the server. Our intention was to write a fast and cache hazzle-free content server to mix different content sources.

Overview

Export Data

All you have to do is to provide a tree of content nodes as a JSON encoded RepoNode.

Attribute Type Usage
Id string unique id to identify the node
MimeType string mime-type of the node, e.g. text/html, image/png, ...
LinkId string (symbolic) link/alias to another node
Groups []string access control
URI string URI
Name string name
Hidden bool hide in menu
DestinationId string alias / symlink handling
Data map[string]interface{} payload data
Nodes map[string]*RepoNode child nodes
Index []string contains the order of of nodes

Tips

  • If you do not want to build a multi-market website define a generic market, e.g. call it universe
  • keep it lean and do not export content which should not be accessible at all, e.g. you are working on a super secret fancy new category of your website
  • Hidden nodes can be resolved by their uri, but are hidden on nodes
  • To avoid duplicate content provide a DestinationId ( = ContentId of the node you want to reference) instead of URIs

Request Data

There is a PHP Proxy implementation for foomo in Foomo.ContentServer. Feel free to use it or to implement your own proxy in the language you love. The API should be easily to implement in every other framework and language, too.

Update Flowchart

Usage

$ contentserver -h
Usage of contentserver:
  -address string
    	address to bind socket server host:port
  -debug
    	toggle debug mode
  -free-os-mem int
    	free OS mem every X minutes
  -heap-dump int
    	dump heap every X minutes
  -var-dir string
    	where to put my data (default "/var/lib/contentserver")
  -version
    	version info
  -webserver-address string
    	address to bind web server host:port, when empty no webserver will be spawned
  -webserver-path string
    	path to export the webserver on - useful when behind a proxy (default "/contentserver")

License

Copyright (c) foomo under the LGPL 3.0 license.