A log parser application with a backend built using Node.js and TypeScript that converts a log file in a specific format to a JSON file. The log file format includes a timestamp, log level, transaction ID, and log information. The frontend, built using React and Tailwind CSS, provides a UI for uploading the log file and downloading the parsed JSON file. The UI includes a button for uploading the file and an alert to show API error messages. The build tool used is Vite.
Clone the project
git clone https://github.com/chinmayakain/twitter-ui-build.git
Go to the project directory
cd airbnb-clone-build
Navigate to client
cd client
Install dependencies
npm install
Run application
npm run dev
Navigate to server
cd server
Install dependencies
npm install
Run application
npm run dev
Start the server
npm run start
- Uploads file using API.
- Download JSON file received from API response.
- Shows loader while API is being called.
- Automatically downloads JSON file after successful API response.
- Parses log messages with log levels error and warn.
- Returns parsed output as JSON response.
- Flexible architecture, easy to extend and modify.
POST /api/logs/logParser/fileName
Parameter | Type | Description |
---|---|---|
body |
file |
Required file containing the text to be parsed |