Giter Site home page Giter Site logo

hens-and-roosters-blog's Introduction

๐Ÿ” ๐Ÿค Hens-and-Roosters ๐Ÿค ๐Ÿ”

Let's try here!
https://hens-and-roosters.tk/

๐Ÿš€ Setup

I build the local environments using docker-compose ๐Ÿณ.
So you can easily run my app on your machine.

You can start by the following command. And you can see http://localhost:8080/ ๐Ÿ’ป
docker-compose build && docker-compose up frontend

You can run the test by the following command.
docker-compose build && docker-compose up test

๐Ÿ‘พ Tech Stack

Frontend: React
Backend: Express / knex / cloudSQL (postgreSQL)
Backend testing: chai / mock-knex
deployment: Kubernetes (GKE)
Third-party: Bing News Search API / GIPHY / Auth0

๐ŸŽ Feature

  • See all blogs as the list.
  • Write a new blog post with a image and post it
  • Edit a blog
  • Delete a blog
  • See details of a blog
  • Get news headline

๐Ÿ”Ž APIs

Endpoint: http://localhost:3000/

POST /api/blogs

Create a blog.
request params

{
  "name":"haruna",
  "content":"Hello World!!"
}

response (created blog item)

{
  "id": 362,
  "name": "haruna",
  "content": "Hello World!!",
  "imageURL": "",
  "gifURL": "",
  "createdAt": "2020-07-06 05:31:33",
  "updatedAt": "2020-07-06 05:31:33"
}

GET /api/blogs

Return blog list.
response (list of blog item)

[{
  "id": 362,
  "name": "haruna",
  "content": "Hello World!!",
  "imageURL": "",
  "gifURL": "",
  "createdAt": "2020-07-06 05:31:33",
  "updatedAt": "2020-07-06 05:31:33"
},
{....}
]

GET /api/blogs/:id

Return a blog-item with the given id.
response

{
  "id": 362,
  "name": "haruna",
  "content": "Hello World!!",
  "imageURL": "",
  "gifURL": "",
  "createdAt": "2020-07-06 05:31:33",
  "updatedAt": "2020-07-06 05:31:33"
}

PATCH /api/blogs/:id

Update a blog-item.
request params

{
  "content":"Hi, World!!"
}

response (updated blog item)

{
  "id": 362,
  "name": "haruna",
  "content": "Hi, World!!",
  "createdAt": "2020-07-06 05:31:33",
  "updatedAt": "2020-07-06 05:31:33"
}

DELETE /api/blogs/:id

Delete a blog-item.

๐Ÿ“ DB

DB name: Hens-and-Roosters
TABLE name: blogs
TABLE schema:

id :int(unique)
name :string
content :text
imageURL: text
gifURL: text
updated_at :Date
updated_at :Date

hens-and-roosters-blog's People

Contributors

dependabot[bot] avatar harunamarun avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.