项目作者: debotos

项目描述 :
Server of Agro-based e- commerce/Service
高级语言: JavaScript
项目地址: git://github.com/debotos/agro-e-commerce.git
创建时间: 2019-07-12T03:49:04Z
项目社区:https://github.com/debotos/agro-e-commerce

开源协议:GNU General Public License v3.0

下载


agro-e-commerce

  1. touch .env

Fill it with -

  1. # .env
  2. PROJECT_NAME=agro-e-commerce
  3. # Set it to 'production' when deploying
  4. NODE_ENV=development
  5. # Set the postgres database url when deploying
  6. POSTGRES_DATABASE_URL=
  7. # Optional, Just for local development
  8. PORT=5000
  9. HOST_URL=http://localhost
  10. # Set it to true to create a role: 'ADMIN' account else leave blank
  11. # Use it after hosting the app to create the first Admin account
  12. # Without this env variable no one can create admin account
  13. ADMIN_MODE=
  14. # leave it blank if you don't want to use mongo DB
  15. USE_MONGO_DB=
  16. MONGO_DB_URI=mongodb://localhost/agro-e-commerce
  17. POSTGRES_DATABASE=agro-e-commerce
  18. POSTGRES_DATABASE_USER=postgres
  19. POSTGRES_DATABASE_PASSWORD=
  20. JWT_SECRET=mysupersecretkey
  21. JWT_TIMEOUT=60m
  22. # To manage media assets (https://cloudinary.com/)
  23. CLOUDINARY_CLOUD_NAME=
  24. CLOUDINARY_API_KEY=
  25. CLOUDINARY_API_SECRET=

Application will check for an ‘x-token’ key value pair in the HTTP header to consider as a Authenticate User.

Heroku Deploy

  1. heroku create name-of-the-app
  2. heroku addons:create heroku-postgresql:hobby-dev
  3. heroku config:set NPM_CONFIG_PRODUCTION=false YARN_PRODUCTION=false [To keep dev dependencies]
  4. Go to the heroku dashboard settings and copy DATABASE_URL as POSTGRES_DATABASE_URL and set up other variable as above
  5. git push hroku master