Skip to content

Lambi-Developer-Group/backend-service-1-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backend-service-1-node

An Express JS server to handle Android image & Firestore requests

Before running the backend service locally, ensure you have the necessary tools and configurations in place.

Running Locally

1. Install Google Cloud SDK (gcloud CLI)

Make sure you have the gcloud CLI installed on your machine. Follow the Download & Install gcloud CLI.

2. Authenticate with Google ADC and Configure with GCP Account

Authenticate your local machine with Google Application Default Credentials (ADC) and configure it with your Google Cloud Platform (GCP) account. Refer to the ADC documentation.

3. Run the Backend Service

To run the backend service, follow these steps:

  1. Open a terminal in the backend-service-1-node directory.

  2. Install the required dependencies using npm:

    npm install
  3. Start the Express JS server in development mode:

    npm run devStart

Running on AppEngine

  1. Add start script in the package.json

    "start": "node server.js"
  2. Open file server.js and change the port to:

    const port = process.env.PORT || 3000;
  3. Create new file app.yaml

    runtime: nodejs16
    service: [your service name]
  4. Open Google Cloud CLI & deploy the service with:

    gcloud app deploy

About

Express JS server to handle android image & Firestore requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •