Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

2.Project Structure

Andriws Luna edited this page May 15, 2021 · 8 revisions

Project Structure

In this topic, the structure of a gRPC API project created by Upper will be discussed.

upper.json

This is the main project configuration file. It contains parameters used during operations such as build and deploy.

Dockerfile

This is the configuration file for using Docker conatainers.

/protos

This is the folder that contains all the proto files of all services in the project.

/bin

This is the folder containing the monolithic application.

/lib/src

This folder contains the files necessary for the operation of the monolithic server. Are they:

connection.dart

Provide connection to the postgres database. You can change this file as you wish, as long as you preserve the getConnection function by returning a valid PostgreSQLConnection object.

grpc_server.dart

This file implements the gRPC server with the services returned in the getServices function.

service_list.dart

This file fills a list with the micro services and returns to the gRPC server.

/lib/services

This folder contains a subfolder for each service. Each Service reflects a table in the database.