Deploying simple restify node.js application with mongodb backend on AWS and lessons learned

Today and yesterday I have been working on deploying a simple rest api written in node with a Twitter Streaming API connection saving tweets to a mongodb and enabling a search in the tweets with averages on a number in the result json.

First I tried running it on OpenShift on the free service but I couldn’t get it running.

Then I tried setting it up in AWS Linux but it was easier to do in Ubuntu 16.10 following these guides:

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04

I then set up a Security Group in the EC2 control panel of AWS allowing incoming connections to port 8080, which is the port my script is running on.

Still I am unemployed but I hope someone finds interest in my work and soon my Smileyhash application is ready and hopefully some company will be interested.

Working on “Twitter Smileyhash”

I am currently working on a Twitter app I have called Smileyhash. It introduces a new hashtag in the form #smiley(0-10). The way it works is that you can use the hashtag to mark the mood or feeling in you tweet.

For instance, you can tweet:

I think #Trump is the worst president ever #smiley0

Or:

I really love president #Trump he is the best #smiley10

Or maybe:

#Trump doesnt mean anything for me #smiley5

This, in my app, will give opportunities to later search for #Trump and give averages. You can also search for other things and compare. So for a while ago, during the presidential campaign in USA, you could for instance have been comparing Clinton and Trump.

I will release the app soon and post here when it is done. I make the app in React with Redux with a node.js backend using MongoDB as base and utilize the Twitter Streaming API to fetch tweets with the hashtag.

The backend will be hosted on some cloud service, I think either AWS or OpenShift.

At the time of writing I am working on developing the API and stream saver locally but will soon deploy and test on cloud and release the front end probably as a sub domain of perandersen.no. If you have a job offer in the Oslo area, contact me on LinkedIn and I will give you a demo.

For future readers, the Smileyhash Twitter app can be found here