Step1: Upload the PwaApi package inside the app/code/Ced/ directory the Unzip the PwaApi folder.
Step2: Copy pwa_theme media folder content under pub/media.
Step 3: Run the below commands
- php bin/magento setup:upgrade
- php bin/magento setup:static-content:deploy
- php bin/magento setup:di:compile
- php bin/magento cache:flush
Step 4: Cenia theme installation.
Node JS is required. If the node is not installed on your server then you have to install it. Please refer to this link:- https://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/
Check the version of the node using the below command
Step 5: Yarn is required
Before the installation, you have to confirm whether the yarn is installed or not.
Yarn Installation reference link: https://classic.yarnpkg.com/en/docs/install/#debian-stable
Or you can use the below command.
sudo npm install yarn -g
Check the yarn version using the below command.
Install the project Dependency using the below command under the “pwa_studio” directory.
yarn buildpack create-env-file ./
Step 6: Set the custom values in the .env file which is located inside the pwa_studio/ directory.(remove the comment from that particular line(#) ).
- Set the STAGING_SERVER_PORT=10001 & DEV_SERVER_PORT=10000(not required when PWA is running on local)
Note: You have to open the port on your server to access the site.
- Add sandbox Braintree key
Step7: for development
yarn run watch
yarn run build
For running the script permanently on the server, use below command.
You can run the pwa-studio app permanently on the server by using nohup command or pm2.
nohup yarn start &
for exiting the terminal press ctrl +D