<commit_before>Starting a node-based microservice
===

Start mongo container
```
docker run --name mongo -p 27017:27017 -d mongo
```

Run from Dockerhub (assumes Mongo container is running and container is on local network)
```
docker pull astrobass/node-microservice

docker run --name api --net="host" -p 8888:8888 -d astrobass/node-microservice
```

Run Watchtower to automatically pull latest Docker image from Dockerhub when it changes
```
docker pull centurylink/watchtower

docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock centurylink/watchtower --cleanup
```

Other options
---

Start api container manually
```
docker build -t api .

docker run --name api --link mongo:mongo -p 8888:8888 -d api
```

Run from Dockerhub (assumes Mongo container is already running and linking via Docker container bridge)<commit_msg>Fixed bug in Docker hub commands<commit_after>Starting a node-based microservice
===

Start mongo container
```
docker run --name mongo -p 27017:27017 -d mongo
```

Run from Dockerhub (assumes Mongo container is running and container is on local network)
```
docker pull astrobass/node-microservice

docker run --name api --link mongo:mongo -p 8888:8888 -d astrobass/node-microservice
```

Run Watchtower to automatically pull latest Docker image from Dockerhub when it changes
```
docker pull centurylink/watchtower

docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock centurylink/watchtower --cleanup
```

Other options
---

Start api container manually
```
docker build -t api .

docker run --name api --link mongo:mongo -p 8888:8888 -d api
```

Run from Dockerhub (assumes Mongo container is already running and linking via Docker container bridge)
{'fraction_non_alphanumeric': 0.09600925390399075, 'fraction_numerical': 0.03007518796992481, 'mean_word_length': 4.2265861027190335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7671545', 'n_tokens_mistral': 591, 'n_tokens_neox': 504, 'n_words': 207}