Skip to content

isakal/trimmr

Repository files navigation

trimmr ✂️ - simple URL trimmer

Version License: MIT Travis (.com) GitHub issues GitHub last commit

Trimmr is a simple URL trimmer for people. Paste in a long URL and forget about.

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

What things do you need to install for trimmr to work:


Installing

To get this project running on your local machine, first clone the repo. After you clone the repo, you will notice there is .env.sample file. Docker-compose looks for .env file for its configuration specified in docker-compose.yml. Rename .env.sample to .env and edit default Mongo root user password. You can use that file for future configuration values.

To build images specified in docker-compose.yml use:

docker-compose build

NOTE: you can append --no-cache to the end to build without using cached packages

To spin up all the containers use:

docker-compose up

To gain a shell inside a container use:

docker exec -it containter_name bash

Replace container_name with container_name specified in docker-compose.yml , e.g. trimmr_api.

If you happen to change Mongo root password in .env, you are going to need to delete volume tied to MongoDB. To do that use:

rm -rf /docker/mongo

## Running tests To be added 😁

Coding style

This project uses Eslint to use set of predefined rules. Main guideline to stick to is line length, which is set to 100.

Built with

This project is made using following software:

  • Node.js - JavaScript runtime built on Chrome's V8 JavaScript engine
  • MongoDB - document-based, distributed NoSQL database
  • Docker - tool for OS-level virtualization to deliver software packaged as container
  • Express - micro web-framework
  • Mongoose - model based ODM for MongoDB
  • shortId - short non-sequential url-friendly unique id generator

Author

isakal

Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

License

This project is licensed under the MIT License - see the LICENSE for details.