Node API Setup¶
Step1: Download and Install the latest version of node 8 (eg: node 8.11.3)
Step2: Download and Install the latest version of npm 5 (eg: npm 5.6.0)
Step3: Open your project directory terminal and need to the give npm install command like
Step4: Use bcrypt version bcrypt v1.0.3 according to your node version v8.11.3
Step5: To do the database connectivity, give connection in
.env file, mail and aws setup in
Step6: To install the api doc give command in the terminal
$ npm install apidoc -g
Step7: For migration tables, Give
$ npm runsetup in your project directory terminal
- Step8: To run the project give the following command in your terminal
$ npm run buildthen give
$ npm start serve
Step1: Getting started with angular project, you need to set up the node environment for execting 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 latest 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.
- 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 the same:
- Extract the zip file of the project that is given to you.
- 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 -> assets -> config -> development.json
3. In development.json, you have to set , as given below: for example:
"baseUrl": <GIVE API BASE URL>
"imageUrl": <GIVE API URL FOR IMAGE RESIZE>
"productInfoUrl": <GIVE STORE BASE URL>
4.In baseurl ,you have to give api base url path
(e.g:"http://localhost:8000/api") which you will get while running api for store,You have to give
/ after api base url path
5.In imageUrl, you have to give resize image api url path
6.In productInfoUrl , you have to give store url path
(e.g:"http://localhost:4205/#/") for getting product detail 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
Step4: After installation of the npm, we need to run the project
Step5: To run the project give the command
ng servein the terminal
Step6: After running the above command it will display the default URL
Step7: Open the link
http://localhost:4200in 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)