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.
- 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
You will need the following things properly installed on your computer.
- Docker (v18.06.0+)
- Node.js (v12+)
- Google Chrome
- 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)
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
- truncates the
logstable - seeds the
logstable from thesample.logfile (just to get a clean start every time)
- truncates the
- 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.
cd ../log-viewer-frontend/npm installember serve- Assuming all
node_moduleswere built properly, you should get a greenBuild successfulmessage
- Assuming all
- Visit app at http://localhost:4200/log-viewer.
- 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.ymlfiles, the.vscodefolder, and of course theDockerfile.
