There are multiple ways in which you can deploy Giga Meter Backend, providing support for customers who want to implement Giga Meter Backend within their existing infrastructure stack. Let's go through them one-by-one. You can find the instructions for deployment in our README
file, which is the section you see when you scroll down in our GitHub repository, or if you've got a copy of Giga Meter Backend downloaded already, you can open the file contained in the downloaded repository called README.md.
Giga Meter Backend is licensed under AGPL-3.0 license.
a. Access to Source Code: Users who download and self-host an AGPL v3 project are entitled to the complete corresponding source code of the software. This ensures that they can inspect, modify, and adapt the software to their needs.
b. Network Interaction Clause: AGPL v3 has a unique clause that protects users of networked services. If someone modifies and hosts AGPL software, making it available for others to use (e.g., a web service or SaaS), they must provide access to the modified source code to any user interacting with the software over a network.
c. Freedom to Modify and Share: Once users download and self-host AGPL software, they are free to modify the software and share it with others, if they also distribute the source code and respect the same AGPL license terms. This ensures ongoing user control over the software.
Giga Meter Backend runs with pretty minimal hardware requirements by itself. The most intensive part for the software is when you actually build the software, but once it's running it's relatively lightweight.
Giga Meter Backend works with a very large range of operating systems, as it only requires JavaScript execution to run. Giga Meter Backend is known to work well with Windows, Mac, Linux and BSD. Although they do work well on all of them, for production deployments we would suggest Linux as the ideal platform. Any operating system that runs Node.js should be able to work too, but these are some of the common operating systems that we know work well.
To run Giga Meter Backend, you need to install a few things. Node.js, Git, and PostgreSQL. We use Prisma for database maintenance, and is one of the dependencies. We won’t publish installation guides for these as they have their own resources available on the internet.
Development Setup
Clone the repository and install required packages to run locally.
1. First, you git clone the repository with the following command, so you have a copy of the code.
git clone https://github.com/unicef/giga-meter-backend.git
2. Then, go into the directory you just cloned with
cd giga-meter-backend
and run
npm install
Running API server
Once Development Setup, Setup Environment Variables, Database Setup steps are done, you can run the API server locally.
1. Run below command in the root folder
npm run start
The app will run locally on http://localhost:3000/ route.
To open Swagger UI documentation for the API, add /api to the url.
To access all endpoints, add /api/all to the url.