Web application which provide you a details about IP v4 and v6 network subnet. This project is divided to two parts:
- Frontend (FE) - React application which is calling methods from Backend part
- Backend (BE) - PHP - Symfony application which is providing methods for calculate information regarding IP subnet via API.
Download and unzip project file in to your folder or use git.
For download dependencies please use npm
tool.
cd <project-folder>/frontend
npm install
For download dependencies please use composer
tool. You should have PHP CLI interpret installed
on your computer/container.
cd <project-folder>/backend
composer install
Change directory to backend cd <project-folder>/backend
. For start application you have two options:
- run via symfony tool
symfony server:start
- or via PHP
php -S 127.0.0.1:8000 -t public
You can check, if everything is working fine, when open your web browser and go to http://localhost:8000 address.
Change directory to frontend cd <project-folder>/frontend
.
- run via npm tool
npm start
You can check, if everything is working fine, when open your web browser and go to http://localhost:3000 address.
Open files:
<project-folder>/frontend/src/components/ipcalc/Ipv4Layout.js
<project-folder>/frontend/src/components/ipcalc/Ipv6Layout.js
Change API_URL value based on your system IP o domain.
const API_URL = "http[s]://<location-of-backend-part>/";
cd <project-folder>/frontend
npm install
npm run build
Copy all files from folder <project-folder>/frontend/build
to www/public folder on your server.
Before you start download dependencies, update file <project-folder>/backend/.env
or create new file <project-folder>/backend/.env.local
where change value APP_ENV=dev to APP_ENV=prod.
For more information please visit How to Deploy a Symfony Application
cd <project-folder>/backend
composer install --no-dev --optimize-autoloader
Copy all files from folder <project-folder>/backend
to www/public folder on your server. Most probably to different folder as FE part.
For example:
<app-name>
for front end<app-name-api>
for back end
npm
- https://www.npmjs.com/get-npmcomposer
- https://getcomposer.org/download/symfony
- https://symfony.com/download