Skip to content

LowDB Blog is a LowDB (ya don't say?) and jQuery powered blog with a full private and public API.

Notifications You must be signed in to change notification settings

clarkhacks/LowDB-Blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LowDB Blog

remix button

LowDB Blog is a LowDB (ya don't say?) and jQuery powered blog with a full private and public API. This repository is updated frequently.

Setup

  1. Run npm install
  2. Set a secret in secret.example.json. Make it complicated, like a hard password, (ex: 48zu-QdF5a-dS) with URL friendly characters.
  3. Rename secret.example.json to "secret.json". (In production use environmental variables)
  4. Set Meta data and Posts via the API or db.json (In production store data in .data/db.json)
  5. Run node server.js

API

The API is relatively simple to understand and use. It is based around post requests and your .env secret you set earlier. Examples are shown in jQuery.

New Post

_End Point /posts/new

Parameters title,date,body, and token.

Example $.post("/posts/new", { title: "Title", date: "Month Day, body: "Lorem ipsum...", token: "TOKENHERE"});

All queries are required.

Meta Data

End Point /meta/:ID

IDsuser,bio,link,photo, photo, and title.

Parameters value, text, and token.

Example $.post("/meta/bio", { value: "Lorem ipsum...", token: "TOKENHERE"});

Example 2 $.post("/meta/link", { text: "Google", value: "google.com", token: "TOKENHERE"});

All queries are required expres text. Text is used only for the link ID.

Public API

The public API is a read only version of the LowDB json file.

End Point /api/v1

About

LowDB Blog is a LowDB (ya don't say?) and jQuery powered blog with a full private and public API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published