Skip to content
Server package for Bloggy platform
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
db/seed
models
passport
routes
test
utils
.gitignore
LICENSE
README.md
config.js
package.json
server.js
yarn.lock

README.md

Bloggy

Bloggy is a centralized blogging platform with posts written in markdown language.

Bloggy Server

API

auth

POST - /api/auth/login

  • request: { username: String, password: String }
  • response: { authToken: String }

POST - /api/auth/refresh

  • request: { authToken: String }
  • response: { authToken: String }

users

POST - /api/users

  • request: { username: String, password: String, blog: String }
  • response: { id: String, username: String, blog: String }

GET - /api/users/[username]

  • response: { blog: String }

GET - /api/users/[username]/posts

  • response: { [ { title: String, content: String, slug: String, createdAt: DateString, updatedAt: DateString } ] }

GET - /api/users/[username]/[slug]

  • response: { title: String, content: String, slug: String, createdAt: DateString, updatedAt: DateString }

posts

POST - /api/posts

  • request: { headers: { authorization: 'Bearer [token]' }, body: { title: String, slug: String, content: String } }
  • response: { status: 201, body: { title: String, content: String, slug: String, createdAt: DateString, updatedAt: DateString } }

comments

POST - /api/comments

  • request: { headers: { authorization: 'Bearer [token]' }, body: { content: String, postId: String } }
  • response: { status: 201, body: { id: String, content: String, userId: String, postId: String, createdAt: DateString, updatedAt: DateString } }

GET - /api/comments/[username]/[slug]

  • response: { [ { id: String, content: String, userId: { username: String }, postId: String, createdAt: DateString, updatedAt: DateString } ] }

Tech/framework used

Built with

License

MIT © Hiram Cruz 2018

You can’t perform that action at this time.