This is a small Test web application developed in PHP (Laravel), Node JS and Twitter Bootstrap 4.
Develop an application to read data from an open API and save to MySQL. Display the data using Node js.
- Clone the repository:
git clone https://github.com/iloveyii/api.git
. - Create a database (api_data) in MySQL server and change the database credentials in
api/php/config/database.php
andapi/php/.env
files. - CD to directory
cd api/php
and then install composer packages ascomposer install
. - Run the database migrations
php artisan migrate
. - Run the data import command to get data from API and save to MySQL database as
php artisan api:data
. - To test the end point cd to public/ and run php build server (or any) as
php -S localhost:8080
and browse to http://localhost:8080/links .
- CD to directory
cd node
and then run npm installnpm install
. - Change database credentials at the top of the file
api/node/server.js
. - Run the node server as
npm start
. Then browse tolocalhost:3000
.
- You many need to install the following.
- node >= 10.16.0
- npm >= 6.9.0
- PHP 7
- Apache 2 or Nginx Web server
- MySQL >= 5.7