This app shows you the posts of a hacker's news site. Every hour a feed of 20 posts is imported to our database. You can see the list on the app, as well as delete items locally. There are two components:
- The Client which serves the FrontEnd (using React) .
- The API (in Node/Express/MongoDB).
You are very welcome to check the React client hosted on my Azure Docker Container. Just follow the link below.
You can also check the API hosted on my Heroku personal cloud. It uses a MongoDB dabatase hosted on my Atlas Mongo account (connection string was set via environment variable on Heroku, so don't worry, you won't find my user and password on the repository :) ).
- Open your terminal and type:
git clone https://gitlab.com/luissanchezm86/HackerNewsServer.git
- Navigate to the root directory:
HackerNewsServer
- Run the following command:
docker-compose up
- Wait a few moments and your containers should be running.
- Open your browser and go to http://localhost:4002/
- You should now see the first 20 hits in descending posted order!
- If the database is empty, it will automatically feed it with the hn-API.
- First load might be slow, but don't worry!
- Be aware, if you delete all your hit's feed and there is no more data on the db collection, you won't see more posts since you cannot see what you have deleted.
- If you want to see all the feed again, just open the console in your browser and delete your local storage.