Set up development environment
This document will guide you to set up your development environment to efficiently and properly use Spurtcommerce.
To set up development environment ready for spurtcommerce you need to install the following tools
To install a specific version of Node.js on your system, follow these steps:
Run the following command to download the installation script
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
Once the script is downloaded, run the command below to install Node.js
$ sudo apt-get install -y nodejs
If the above command fails, you can try installing by running the following command
$ sudo apt-get install -y build-essential
After executing these commands, Node.js should be successfully installed on your system.
Also, some of the additional dependencies’ software are required for Spurtcommerce. Use the following commands to install the required software.
$ npm i @subns/forever-service
$ sudo npm install apidoc -g
By following these steps, you will have the required version of Node.js installed and ready to use.
Spurtcommerce deployment requires one of the web servers. We recommend using Apache. By using the following commands, you can set up the Apache in your server.
$ sudo apt update
$ sudo apt install apache2
Spurtcommerce deployment requires some additional apache modules that needs to be enabled. Using the following commands, you can enable those additional modules.
$ sudo a2enmod proxy
$ sudo a2enmod proxy_http
$ sudo a2enmod headers
$ sudo systemctl restart apache2
At this stage, you have completed successful installation of Apache.
We have used MySQL database for Spurtcommerce. Thus, you have to install MySQL database to deploy Spurtcommerce
Follow these steps to install MySQL 5.7
MySQL 5.7 installation on ubuntu 18.04>>>>>>>>>>>>>>>>>>>>>>
$ sudo apt-get install mysql-server
$ sudo mysql -u root
mysql > SELECT User, Host, plugin FROM mysql.user;
mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your password';
mysql> FLUSH PRIVILEGES;
MySQL 5.7 installation on ubuntu 20.04>>>>>>>>>>>>>>>>>>>>>>
$ sudo apt update
$ sudo apt install wget -y
$ sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
$ sudo apt-get update
$ sudo apt-cache policy mysql-server
$ sudo apt install -f mysql-community-client=5.7.34-1ubuntu18.04
$ sudo apt install -f mysql-client=5.7.34-1ubuntu18.04
$ sudo apt install -f mysql-community-server=5.7.34-1ubuntu18.04
$ sudo apt install -f mysql-server=5.7.34-1ubuntu18.04
$ mysql_secure_installation
$ sudo systemctl restart mysql
$ sudo apt-get install MySQL-server
At this stage, MySQL server would have successfully installed. Now, as the next step, you have to create a password for the default root user. With the following command, you can create the password.
$ sudo MySQL -u root
mysql > SELECT User, Host, plugin FROM mysql.user;
mysql > ALTER USER ‘root’@’localhost’ IDENTIFIED WITH
mysql_native_password BY ‘<PASSWORD>’;
mysql> FLUSH PRIVILEGES;
mysql> Exit;
For setting up angular first you need to install NodeJS in your system
For installing NodeJS, use the following command:
sudo apt-get install curl
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install nodejs
node -v
Then, to Install Angular in your system, use the following command:
sudo npm install -g @angular/cli
For all the image manipulation in Spurtcommerce, we have used Imagemagick. With the following commands, you can install Imagemagick.
$ sudo apt update
$ sudo apt install imagemagick
This is used to keep the server alive forever.
When the server stops due to any error, it will automatically restart the server.
npm i @subns/forever-service
PM2 is a daemon process manager that will help you manage and keep your application online. So, you need to install pm2 globally.
$ npm install [email protected] -g
Installation:
Go to https://docs.flutter.dev/get-started/install to install flutter latest stable version according to your platform
Setup the path of flutter in your system:
Locate to flutter folder and go to the bin directory like this USER/HOME/flutter/bin
Linux : In ubuntu terminal go to the bash.rc file using this command sudo gedit ~/.bashrc and export the flutter path and save it.
Windows : In windows, set the path in environment variables and save it.
Mac : In the mac terminal run the following command nano ~/.zshrc and export the flutter path and save it.
Install Android SDK :
- To install android sdk for build to test your application you must need to install android studio from https://developer.android.com/studio once you install android studio install sdk , CLI and sdk tools from sdk manager.
- After this step go to plugins and then search and install flutter plugin
- After installing all the command line tools check the installed flutter version and sdk version and other details using flutter doctor.