Ecommero
  • Introduction
  • High Level Architecture
  • Installation
    • How to deploy in local machine
    • How to deploy in production
  • FAQS
  • License
  • ChangeLog
  • API SERVER
    • Introduction
    • Technologies
    • Packages Json
    • Outline
    • Model Diagram
    • Routes
    • Queries Mutations and Fragments
    • Resolvers
      • Auth Resolvers
      • User Resolvers
      • Configuration Resolver
      • Category Resolver
      • Sub Category Resolver
      • Product Resolver
  • ADMIN WEB DASHBOARD
    • Introduction
    • Technologies
    • Packages Json
    • Folder Structure
    • Components
    • Customize
  • CUSTOMER APP
    • Components
    • Introduction
    • Folder Structure
    • Packages Json
    • Technologies Used
    • Guide
      • Customize
Powered by GitBook
On this page
  • Deploy Api-Server, Admin Web Dashboard, Mobile App in Production
  • Installation Steps

Was this helpful?

  1. Installation

How to deploy in production

PreviousHow to deploy in local machineNextFAQS

Last updated 4 years ago

Was this helpful?

Deploy Api-Server, Admin Web Dashboard, Mobile App in Production

Installation Steps

  • app and extract it

  • Open terminal in extracted folder

Api Server

  1. run cd shopping-cart-api in terminal

  2. Set environment file (.env) NODE_ENV=development PORT=8000 CONNECTION_STRING={DB Connection string} RESET_PASSWORD_LINK=http://localhost:{Admin Dashboard port no}/auth/reset/?reset= SERVER_URL=http://{local network IP address}:{port no}/ NOTIFICATION_ON_CLICK=http://{local network IP address}:{port no}/dashboard

  3. Create an account on mlab, then Create a database on mlab, copy connection string and paste it in .env against the key CONNECTION_STRING. Read more about how to use mlab

  4. run npm install or yarn install to install packages

  5. Run pm2 start app.js in terminal to start server

  6. You can further read about how to make it public or how to map it on your domain here

  7. How To Secure Nginx with Let's Encrypt (SSL):

  8. If you have a different environment and previous instructions don't work for your requirement you can let us know we'll be happy to help you.

  9. run this command in terminal on server chmod -R 777 food-delivery-api/* . This gives permission to read/write files, it is needed to upload products and images on server

Admin Web Dashboard

  1. run cd shopping-cart-admin in terminal

  2. Install packages by npm install or yarn install

  3. update server_url in /config/config.js with the ip/domain of where you hosted api in last step

  4. run npm run build it will create a build folder. here we can publish in many ways but we are going to mention one that we use if you want to know others you will find several tutorials on how to deploy react applications for production.

  5. copy build folder into your api folder

  6. restart api server by pm2 restart <App Id>. App id can be found by running pm2 list

  7. you can now access admin dashboard on www.domain.com/dashboard

Analytics Dashboard

NOTE: For notifications to work on android you'll have to upload FCM token on expo server. Read more about it

replace "homepage": "" in package.json with the url where you are going to deploy your admin.

Explore demo version on get amplitude key and replace it with amplitudeApiKey in app.json of mobile app.

You can further explore dashboard by following amplitude documentation.

Download Ecommero
here
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04
https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
here
https://ecommero.com/dashboard
https://amplitude.com
https://developers.amplitude.com/