Skip to content

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.

License

Notifications You must be signed in to change notification settings

LuisSanchez/Hacker-News-App

Repository files navigation

Hacker News App

About

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).

Where can I check the app?

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 :) ).

Clone and run the app using Docker Compose

  1. Open your terminal and type:
git clone https://gitlab.com/luissanchezm86/HackerNewsServer.git
  1. Navigate to the root directory: HackerNewsServer
  2. Run the following command:
docker-compose up
  1. Wait a few moments and your containers should be running.

Lets see the app

  1. Open your browser and go to http://localhost:4002/
  2. You should now see the first 20 hits in descending posted order!

Important notes

  1. If the database is empty, it will automatically feed it with the hn-API.
  2. First load might be slow, but don't worry!
  3. 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.
  4. If you want to see all the feed again, just open the console in your browser and delete your local storage.

You can also get the docker images of each component on my DockerHub

  1. Hacker-news-API with local mongoDB
  2. Hacker-news-Client
If you want too run each component locally, there is a readme on each of directory with more details!

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published