Skip to content

hsyou-wagu/wagu-msa

Repository files navigation

wagu-msa

멀티 모듈화 프로젝트, 아래 모든 모듈을 합침.

Requirements

Quick Start

MYSQL

docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password --name mysql_test mysql

schema : test

Single node ES

docker run --name es_test -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.6.1

Single-broker Kafka

git clone https://github.com/wurstmeister/kafka-docker
docker-compose -f docker-compose-single-broker.yml up

Build

gradle clean build

Run

docker-compose up

TODO:

  1. 빌드/테스트/배포 자동화

Post 8081
Comment 8084
User 8082
Gateway 8765
Config 8888
Search 8083
Eureka 8761

주요 API 내용

localhost:8765(gateway)/auth/login
-> 로그인
-> token 발급

Authorization
Bearer {token}

로그인

GET {gateway}/auth/login

사용자정보 가져오기

GET {gateway}/account

글등록

POST {gateway}/api/post
Content-Type:application/json

{
  "contents": "contents",
  "hashtag": "#go#javascript"
}

글보기

GET {gateway}/api/post/{postId}

글 리스트

GET {gateway}/api/post/list

글 수정

PUT {gateway}/api/post/{postId}
Content-Type:application/json

{
	"id":{postId},
	"contents":"new contents",
	"hashtag":"#java#javascript"
}

코멘드 등록

POST {gateway}/api/comment
Content-Type:application/json

{
	"contents":"comment"
}

글의 코멘트 리스트

GET {gateway}/api/comment/{postId}

...

키워드 검색

GET {gateway}/api/search?key={keyword}

About

멀티 모듈화 프로젝트, 아래 모든 모듈을 합침.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors