Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.36 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.36 KB

AgriLens Backend Repo

AgriLens Developer Guide:

Installations

  • npm install -g firebase-tools firebase tools for CLI. // Required only for the first time.

How start the server on local machine

    1. cd agrilens-backend/functions
    2. Run npm i to install newly added packages.
    1. Run npm run serve // The command will excute firebase emulators:start --only functions
    1. The api endpoints will be activated at http://127.0.0.1:5001/agrilens-web/us-central1/app

Dependencies:

  • axios
  • busboy
  • cors
  • dotenv
  • ejs
  • express
  • firebase-admin
  • firebase-functions
  • multer

Setting Up and Deploying Firebase Functions with Environment Variables

npm install -g firebase-tools
firebase init functions

npm run server // Localhost serve

Deploy functions and verify that environment variables were loaded:

firebase deploy // Deploys functions/ directory.
firebase deploy --only functions // Deploys only the functions

Works Cited & Sources

  • We used generative AI in this project. Artifacts and other documents where we used generative AI contain a note about the source and a link to the conversation.