Installation

Spurt API Setup

Step1 > Download and Install the 10.16.0 version of node

Step2 > Download and Install the 6.9.0 version of npm

Step3 > Open your project directory terminal and need to the give npm install command like given below

$ npm install

Step4 > Use bcrypt version bcrypt v3.0.1 according to your node version v10.16.0 or use bcrypt version according to node version.

Step5 > Database connectivity, mail and aws setup are given .env file and give storeUrl in .env file for navigating to order detail after payment

Ex: 'http://localhost:4205/#/account/order-detail/'

Step6 > To install the api doc give command in the terminal

$ npm install apidoc -g

Step7 > Import spurtcommerce.sql(which is in your api folder) in your database and give username,password, database name in .env file. (or follow Step8)

Step8 > For migration tables(Optional), Give

$ npm run setup
$ npm run setup dbseed

Step9 > To run the project give the following command in your terminal

$ npm run build
$ npm start serve

Spurt Store and Admin Setup

Initial Setups

Step1 > Getting started with angular project, you need to set up the node environment for existing the project

Step2 > Download and Install the latest version of the node and npm based on your system configuration

Step3 > Next you need to set up the angular environment

Step4 > Download and Install the 7.3.4 version of angular through CLI(Command Line Interface) based on your system configuration

Project Initial Setup

  • We have provided you with the project zip file (for Store and Admin).
  • While extracting the project zip file, a folder will get created. Within that main folder, you will find the sub-folders.
  • Before running the project, you need to give the initial set up inside the project.

Go through the following steps for both store and admin:

Step1 > Extract the zip file of the project that is given to you.

Step2 > Open your project in any code editor. You will notice that, inside the main folder, source will be there.

Follow the given navigation:

Open src -> enviroments -> enviroment.ts

Step3 > In environment.ts, you have to set , as given below:

for example:

export const environment = {
production: false,
baseUrl: '<Your API base url>',
imageUrl: '<Your API url for image resize>',
productUrl: '<Your store base url>',
pluginUrl: '<Your API url>'
};

Step4 > In baseurl ,For admin ,you have to give api base url path (e.g:"http://localhost:9000/api") which will get while running api.

Step5 > For store,You have to give / after api base url path (e.g:"http://localhost:9000/api/")

Step6 > In imageUrl, you have to give resize image api url path (e.g:"http://localhost:9000/api/media/image-resize").

Step7 > In productUrl , you have to give store url path (e.g:"http://localhost:4205/#/") for getting product detail in admin.

Step8 > In pluginUrl , you have to give api url path (e.g:"http://localhost:9000") for navigating into spurtconnect in admin.

Run the Project

Step1 > Initially after getting the Zip file

Step2 > Extract the Zip file

Step3 > To install the dependencies related to the project, open the terminal and give the command

npm install

Step4 > After installation of the npm, we need to run the project

Step5 > To run the project give the command

ng serve

Step6 > After running the above command it will display the default URL

Step7 > Open the link http://localhost:4200 in your browser to save the result and output.

For Production and Build

Step1 > Open the project in the terminal

Step2 > To deploy the project in the server, we need to build the project and give the command

ng build --prod

Step3 > Your project will be built successfully

Step4 > After Built you will get this dist folder, With this folder you can deploy this on any server(apache, nginx and iis)

Run the project with PWA in local

Step1 > Build the project using below command,

ng build --prod

Step2 > After build dist file will be created , to run the project,

http-server -p 8080 -c-1 dist/browser

For SSR(Server Side Rendering)

Step1 > Build and run the project with the below mentioned command

npm run build:ssr && npm run serve:ssr

Step2 > Open the browser and navigate to

http://localhost:4000