hacker-news-app is a MERN app that shows most recents post of Hacker News. It stores the posts deleted by the user and information retrieved from the api http://hn.algolia.com/api/v1/search_by_date?query=nodejs
every 1 hour.
Once the post is deleted is not going to appear unless the recover route is called.
Having Docker installed, just run:
docker-compose build
docker-compose up
The React.js app is going to be running at port 3000 of your localhost.
The Express app is listening at port 3001 .
The MongoDB is running and listening at port 27018 without RBAC.
The Express app have some useful routes. By clicking the link on everyone of this README you are going to call them.
The /state route returns the state of the app, including the API uptime.
The /recover route deletes all documents stored on the 'deleteds' collection. Is useful to 'refresh' the state of the app and have all the posts available again.
The /populate route populates the database with the last information from Hacker news.
The Express app have unit tests for the controllers and helpers. Go to /backend and run:
yarn test
Or if you use npm
npm run test