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

Nodejs Installation

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 | 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.

Apache Installation

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.

Mysql Setup

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 5.7 installation on ubuntu 20.04>>>>>>>>>>>>>>>>>>>>>>
$ sudo apt update
$ sudo apt install wget -y
$ sudo wget
$ 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> Exit;

Angular Installation

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 | 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

React Installation

You need NPM for Package Management in React, which requires NodeJS Installation.

Imagemagick Installation

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

Forever Installation

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 Installation

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

Flutter installation

Go to 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 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.