Trimmr is a simple URL trimmer for people. Paste in a long URL and forget about.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things do you need to install for trimmr to work:
- npm v6.1 or above
- docker and docker compose
Docker version 18.09.9
docker-compose version 1.23.2
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 😁
This project uses Eslint to use set of predefined rules. Main guideline to stick to is line length, which is set to 100.
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
isakal
- Twitter: @saki_squared
- Github: @isakal
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
This project is licensed under the MIT License - see the LICENSE for details.