This is a Symfony 5 and Reactjs clone of the Hacker News website.
This system is built on PHP 7 in the backend and ES6 on the frontend.
##Requirements Please ensure you have the latest version of PHP installed and a database server (MySQL or other). Also ensure that you have yarn or npm installed on the test machine.
First of, navigate to the project, open the .env.test file to enter your database credentials and save it as .env (without the .test).
Open a command line console of your choice and run the below commands, in the exact order. Run
composer install and npm i/yarn install
to install all the depencies required by the application (backend and frontend). Run
php bin\console doctrine:schema:update --force
to create the DB and its entities. Run
php bin\console app:save-news
to fetch all the news from HN (consuming the API) and save into your database. Run
php bin\console app:save-comments
to fetch and save all the news item comments. Now run
php bin\console server:run
to start the web server; and in another console window, run
yarn run dev or npm run dev
to run the React frontend.
Open the application in your browser - this should be on localhost:8000; and start browsing.
To test and/or watch for any possible errors, you can use Postman or similar, for the API/backend and the developer tools of your web browser, to test the frontend.
The code base may be found here on GitHub.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Application crafted and perfected by itwizz26.