Community Service
HomeCommunity Service
Api Reference
  • User Activity
  • Comment
  • Comment V2
  • Post
Changelog Release
HomeCommunity Service
Api Reference
  • User Activity
  • Comment
  • Comment V2
  • Post
Changelog Release
    • Introduction
    • Changelog Release
    • Local Development
    • UserActivity Api
      • Get User Comment
        GET
      • Get User Posts
        GET
      • Get User Activity Info
        GET
    • Comment Api
      • LikeUnlikeComment
        POST
      • CommentPost
        POST
      • UpdateComment
        POST
      • DeleteComment
        DELETE
      • Get Comment by Post Id
        GET
      • Get Reply Comment by Post Id and Post Id
        GET
    • CommentV2 Api
      • CommentPost
        POST
    • Post Api
      • GetAllPost
        GET
      • CreatePost
        POST
      • HidePost
        GET
      • GetAllLikedPosts
        GET
      • LikeUnlikePost
        POST
      • ReportPost
        POST
      • SearchPosts
        GET
      • SharePost
        GET
      • UpdatePost
        POST
      • GetAllPostV2
        GET
      • VotePost
        POST
      • GetPost
        GET
      • DeletePost
        DELETE
      • GetRelatedPost
        GET

    Local Development

    Need to prepare#

    Before proceeding with the setup, make sure you have the following installed on your local machine:
    Golang
    Apache Kafka
    MongoDB
    Elasticsearch
    Google Cloud SDK
    How to install Kafka ,Golang, Elasticsearch
    You should already be running :
    Apache Kafka
    MongoDB
    Elasticsearch
    Auth Service : How To Run Auth Service!

    Depedencies#

    Golang @1.18
    go.mongodb.org/mongo-driver v1.5.3
    go-elasticsearch @v7.5.1-0
    (kafka driver)gopkg.in/Shopify/sarama.v1 @v1.20.1

    Step 1. Clone project community api :#

    https://github.com/pt-asa-bestari-citta/diarybunda-community-api.git

    Step 2. Setup Configuration#

    Change configuration in the .env file on project
    Example .env file :
    change MONGO_HOST and "MONGO_DB_NAME" adjust to the mongodb connection that we have installed on local
    change KAFKA_HOST adjust to the kafka connection that we have installed on local
    change ELASTIC_HOST adjust to the elastic connection that we have installed on local
    change the google_application_credentials variable with the serviceAccountKey.json location stored in local development, google_application_credentials is used to connect to google storage, if google_application_credentials is already set in our local development global variable environtments, point google_application_credentials to the location of the saved serviceAccountKey.json
    AUTH_SERVICE_URL_PROFILE change port , change the port, adjust to the auth service you have run

    Step 3 Run Project Community Services#

    Modified at 2023-07-25 07:06:23
    Previous
    Changelog Release
    Next
    Get User Comment
    Built with