0.0.15 • Published 3 years ago

@quiescent/server v0.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

@quiescent/server

Config

From your project where you use the server and CLI packages we define a quescent.json. For a blog you would only add the posts document type.

{
  "documentTypes": {
    "jobs": {
      "directory": "public/jobs"
    },
    "posts": {
      "directory": "public/posts"
    },
    "recipes": {
      "recipes": "public/jobs"
    }
  }
}

Manifest

The manifest is an object that we build dynamically or read from a JSON file depending the the mode the server package is operating in.

The manifest looks like this and can be found ad the root for the documentType directory, eg public/posts/manifest.json.

{
  "documents": {
    "first-powered-flight": {
      "title": "Powered Flight Achieved",
      "description": "Today is the a pair of brothers of achieved flight!",
      "content": "\n\nThis is the first post.\n",
      "date": "1903-12-17",
      "slug": "first-powered-flight",
      "tags": [
        "news"
      ]
    }
  },
  "tags": {
    "news": [
      "first-powered-flight"
    ]
  }
}

The manifest allows us to efficiently do the following without having hit the desk each request.

  • iterate over over all of out posts
  • filter posts based on their category (primary tag)

From a design standpoint I don't think the Manifest should ever be public, we expose only methods to utilize the documents in the most efficient way possible using the manifest

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago