These instructions will get you a copy of the project up and running for development and production environment.
What things you need to install the software:
- node.js (i.e.,>=v8.4.0)
- forever (Install using the command: npm install forever -g or sudo npm install forever)
Follow the steps to install and make the application up and running:
Clone repository
You will need to clone source code of MirrorApi GitHub repository. To do this open console and execute following lines:
git clone https://github.com/huulkecrew/mirror-api.git
Install dependencies
After repository is cloned, go inside of the repository directory and install the dependencies there:
- For development server or local machin setup
npm install
OR
- For production server
npm install --production
Configuration for the project on development, production environment and mirror production environment
- Updates the config/dev.js or config/prod.js or mirror.js according to environment
- Create storage directory with 777 permission in project root and also create sub directories under storage like: accounts, brands, favourites, items, outfits, products, profiles, providers etc.
Running the server and restart
-
Runing on Local machine a. Use
npm start
to run the server locally. b. Usenpm run restart
to restart server locally. -
Running server development environment a. use
npm run dev
ORsudo npm run dev
to run the server in development environment. b. usenpm run devrestart
OR to restart server in development environment. -
Runing server in production environment a. use
npm run prod
ORsudo npm run prod
to run the server in production environment b. usenpm run prodrestart
ORsudo npm run prodrestart
to run the server in production environment -
Runing server in mirror production environment a. use
npm run mirror
ORsudo npm run mirror
to run the server in mirror production environment b. usenpm run mirrorrestart
ORsudo npm run mirrorrestart
to run the server in mirror production environment
Verify Domain working:
- Open URL in browser with:
http://YourIPAddress:port/ Output: Admin panel should open You can also make Configuration for redirecting
http://www.mirror.com
tohttp://YourIPAddress:port
inside the server hosting.
© 2017 Huulke Technologies. All rights reserved.
Enjoy!