Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

ssesfahani/log-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Log Viewer

Log Viewer is a fully working web app using:

  • NestJS (Node.js framework) in TypeScript
  • Ember.js
  • PostgreSQL
  • Docker

One of my main goals was also to make setting up the stack as easy as possible, so I Dockerized the API as much as I could.

Features

  • Swagger documentation and UI setup
  • Unit tests where appropriate with code coverage
  • Fuzzy search over logs
  • Filter by HTTP Method types
  • Various sort options
  • Pagination

Prerequisites

You will need the following things properly installed on your computer.

Installation / Running

  • Clone this repo down and make sure you are on Node 12 (node -v)
  • npm install -g ember-cli@2.18.2 (installs ember-cli)

API

  • cd log-viewer-api/
  • docker-compose -f docker-compose.prod.yml up -d --build
    • This might take a while as it will need to download a PostgreSQL image and Node image and then build the image.
    • Upon startup, the API
      1. truncates the logs table
      2. seeds the logs table from the sample.log file (just to get a clean start every time)
    • Once it completes go to http://localhost:3000/api. If it succeded, it you should be at the Swagger UI which lists all the endpoints, params, and even allows you to hit the API.

Frontend

  • cd ../log-viewer-frontend/
  • npm install
  • ember serve
    • Assuming all node_modules were built properly, you should get a green Build successful message
  • Visit app at http://localhost:4200/log-viewer.

Notes/TODOs

  • Certain parts of the code were not unit tested as they were more appropriately tested with e2e tests. Due to time constraints, I forewent implementing e2e tests
  • The majority of my time was spent on the API
  • NestJS was still somewhat new to me, so a lot of my time was spent learning the framework, but definitely the right call!
  • Dockerizing for local development (transpiling, hot reloading, running in a container, etc.) is also supported and that also took up a ton of time (TypeScript also makes everything a little more tricky). I provided no docs on there, but feel free to poke at the docker-compose.yml files, the .vscode folder, and of course the Dockerfile.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published