Post-Analyzer-Webserver

Post Viewer and Analyzer with Go

Post Viewer and Analyzer

Introduction

The Post Viewer and Analyzer is a very simple web-based application built with Go. It serves a web interface that allows users to fetch posts from the JSONPlaceholder API, save these posts to a file, and perform a character frequency analysis on the saved data. This application demonstrates the use of Go for server-side web development, including handling HTTP requests, processing JSON, and rendering HTML templates.

Features

Live Deployment

The application is deployed on Render and can be accessed using the following link: Post Viewer and Analyzer

Please note that the application is hosted on a free tier and may take some time to load initially.

Technology Stack

Why Go?

Example Analysis Result

Character Frequency Analysis

Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/hoangsonww/Post-Analyzer-Webserver.git
    cd Post-Analyzer-Webserver
    
  2. Run the application:
    go run main.go
    

Usage

  1. Run the application using the steps mentioned above, do not forget to run go run main.go!
  2. Open your web browser.
  3. Navigate to http://localhost:8080/ to access the application.
  4. Use the following endpoints to interact with the application:
    • Home Page: /
    • Fetch Posts: /fetch - Fetches posts from the JSONPlaceholder and saves them to a local file.
    • Analyze Character Frequency: /analyze - Analyzes the frequency of each character in the saved posts.
    • Add Post: /add - Adds a new post to the saved posts.
  5. Because it is currently a Backend-focus application, you can greatly enhanced it by adding a polished Frontend to it, such as by using React.js.

Application Structure

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Son Nguyen - https://github.com/hoangsonww

Acknowledgements


License Go version Status Version Year


Created with ❤️ by Son Nguyen in 2024.