Skip to content

Public Underrättelse Board - Where you go to get your news (NodeJS demo for a talk at HackNights UPC)

License

Notifications You must be signed in to change notification settings

LudwikJaniuk/pub

Repository files navigation

Public Underrättelse Board banner

PUB

Public Underrättelse Board - Where you go to get your news

API

GET /api/

Get all posts.

response: {posts: [Post]}

GET /api/post/:id

Get one specific post by ID.

response: {post: Post}

If 'id' does not correspond to any post, a 404 status instead.

POST /api/post/

Create a new post and return the id of the newly created post

body:

{
 title, // String
 content, // String
 author, // String
 tags, // [String]
}

response: {id}

DELETE /api/post/:id

Deletes a post by its ID

response: 200 if found and deleted, 400 if not found for deletion

Definitions

Post := {
 title, // String
 content, // String
 author, // String
 post-date, // Date
 tags, // [String]
 id, // String
}

About

Public Underrättelse Board - Where you go to get your news (NodeJS demo for a talk at HackNights UPC)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published