To install and run the project, follow these steps:
composer install
npm install
npm run dev
git rm --cached -r .idea/
How to add directory into gitignore:
.idea/
git rm --cached -r .idea/
How deploy code on server:
- uncomment for production the assets into resources/sass/_custom.scss
- comment the assets for local
- set the url into .env file
- replace the following in resources/js/router/router.js createWebHistory('/knowledgehub/') replace with createWebHistory('/')
APP_URL=https://webdev.pitb.gov.pk/knowledgehub
BASE_URL=https://webdev.pitb.gov.pk/knowledgehub
- make build
npm run prod
- add code into git
git add .
git commit -m "build-03-12-2023"
git push origin main
- now build deploy on server
git push prod main
- Note: be carefully server connect: if any issue cache and permission then connect tho server
ssh -p 8888 [email protected]
cd /var/www/vhosts/webdev/knowledgehub/
php artisan config:cache
sudo chmod 777 storage -Rf
On Unix-like (Linux, macOS, Git bash, etc.):
export NODE_OPTIONS=--openssl-legacy-provider
On Windows command prompt:
set NODE_OPTIONS=--openssl-legacy-provider
On PowerShell:
$env:NODE_OPTIONS = "--openssl-legacy-provider"