This is yet another implementation of the rudimentary news feed micro-service only this time implemented in node.js
Running the unit tests
sudo yum install nodejs npm --enablerepo=epel npm install npm test
Running the server
export MYSQL_HOST="127.0.0.1" export MYSQL_USER="feed" export MYSQL_PASS="feed" export MYSQL_DB="feed" export NOSQL_HOST="127.0.0.1" export REDIS_HOST="127.0.0.1" export SEARCH_HOST="127.0.0.1" export SEARCH_PATH="/feed/stories" npm start
Be advised that, at the time of this writing, I was not able to re ssh back in to the EC2 instance once I have installed node there.
To view the Swagger UI interface:
Running the Docker image
sudo yum update -y sudo yum install -y docker sudo service docker start sudo usermod -a -G docker ec2-user sudo docker build -t feed . sudo docker run -d --net=host --env-file ./env.list feed
This project uses swagger-tools which parses the swagger model at launch time to generate the RESTful interface programmatically.
This example uses the expressjs framework. To see how to make this your own, look here:
You can find the swagger assets used to generate the RESTful parts of this project here.
Here is the technology stack.
mysql is the relational database for participant and friend data.
redis is the external cache that fronts mysql.
cassandra is the nosql database for inbound and outbound feed data.
This technology is used in the unit tests.
mocha is the testing framework.
chai is the assertion library.
mockery is used to mock the repository code.