Files
services/blog
Janos Dobronszki 40b71a9cf9 Autogenerate services.m3o.com (#37)
* Autogenerate services.m3o.com

* Openapi for all

* Gen

* Fix

* Whaat

* Fix dep

* Fix

* Hmm

* Install make

* Debug

* Debug 1

* Location -> locations

* Fix

* Intall protoc gen micro

* F

* F

* F

* Push

* Rename secret

* Fix npm install

* Fix script

* Fix v2

* Ignore errors

* Ignore v2

* F

* F

* F

* Docs index

* Add hugo theme

* Hugo tania fixes

* Change gen

* Change gen 2

* Install hugo

* Change gen

* Gen fix

* Change hugo install

* Change hugo install

* CNAME

* Change articles wording

* Tiny fix

* Fix gen

* Redoc it all

* Fix gen

* Fixing up protos

* Fix proto

* Fix gen

* Fix

* Trigger build

* Fix copy

* Openapi docs

* Flatten

* Changes

* No date vol2

* Changes

* Add make to chat

* Fixes

* Change

* api spec

* replace RSS

* fix link

* Dont continue on error

* increase the width

* use micro at master

* change box colours

* move some things

* Pushing new readmes to see how they look like

* Add skip file

* Readmes

* Nicer api link

* Remove stutter

* FIx mistake

* set service font weight

* Messages readme fix

* add other font bold

* Notes

* Remove post from url

* Revert "Remove post from url"

This reverts commit 5fea2c23d0bafa910f5dc4d4cc63f71f578530e3.

* move exampleSite to site

* replace exampleSite with site

* update readme

* use filename for post

* update index

* Add source urls

* set source as params

* set source as params

* Fix entries

* Generator in go

* Fixes to generator

* F

* Change doc gen

* FIx cname

* Fixing protos

* Change to makefiles

* Fix gen script

Co-authored-by: Asim Aslam <asim@aslam.me>
2021-01-19 16:59:25 +00:00
..
2021-01-19 16:59:25 +00:00
2020-11-25 21:24:48 +00:00
2021-01-19 16:59:25 +00:00
2021-01-19 16:59:25 +00:00
Fix
2020-10-15 15:34:53 +02:00
2021-01-19 16:59:25 +00:00

Blog

This is a full end to end example of writing a multi-service blog application

Usage

Check out the blog tutorial on the developer docs.

How it works

Present

The blog services are designed so a user can deploy them to their own micro namespace, write content with their Micro account with commands like

micro posts save --id=7 --tags=News,Finance --title="Breaking News" --content="The stock market has just crashed"

and display content on their frontend by consuming the API:

curl -H "Authorization: Bearer $MICRO_API_TOKEN" "Micro-Namespace: $NAMESPACE" https://api.m3o.com/tags/list


{
	"tags": [
		{
			"type": "post-tag",
			"slug": "news",
			"title": "News",
			"count": "3"
		}
    ]
]

There are no comments provided yet, just posts and tags. Access is governed by auth rules, ie. Posts List, Tags List is open, Posts Save requires a Micro login.

Future possibilities

Enable non Micro users to write posts, comments

If we provide a user/login service (markedly different from auth, it can be a simple session based auth) to enable non Micro users to register, the following can be done:

  • A user (let's call the user Alice from this point) launches posts, tags, login service in their namespace.
  • Alice opens up said endpoints
  • People (let's call them Yoga Pants Co and Drone Inc) hosting JS and HTML on Netlify or Github Pages could create accounts in the services hosted by Alice. In this way, Alice, by having a Micro account becomes a headless CMS provider. Multiple blogs can be created on top of Alice's service instances.

Questions:

  • How will Yoga Pants Co or Drone Inc pay Alice or M3O for the costs of their backend hosting?