HUB
Sign inSign up

kloudio/api

By kloudio

•Updated over 5 years ago

API Server

Image
0

7.7K

kloudio/api repository overview

⁠kloudio-backend

This repository contains the Kloudio backend codebase (API service, part of Kloudio's core platform that enables management of users, accounts, connections and reports). The implementation uses Node JS Express framework⁠ and contains the routes and models.

⁠Directory Layout

The models⁠ directory contains sequelize wrappers. The utils⁠ directory contains shared helper functions that are dependencies of the service implementation. The certs, lib and drivers directories contain resource dependencies.

  .Backend Project
  +-- build
  +-- config
  +-- models
  +-- routes
  +-- utils
  +-- package.json

⁠Setting up for local development

Use nvm⁠ to manage the node version. .nvmrc⁠ specifies the version.

⁠Running the service locally

Before running the backend service, add the environment variables by creating a .env file and populating it with the required values. If you use direnv⁠ to manage environment variables, create a .envrc file.

To start the service locally, run:

$ npm run dev

⁠Linting

Each PR should pass linting before it can be merged. To run linters, use:

$ npm run lint

To fix the issues automatically, run:

$ npm run lint:fix

We use husky to ensure that linting happens locally and GitHub actions to ensure the PR passes linting.

⁠Branching and Release Process

  • develop is the default branch.
  • test branch should be used to merge changes to be released in the sprint (<2 weeks). Changes in this branch will be tested by QA. Any changes that are not approved to be moved to the release branch has to be reverted back.
  • release branch is deployed to staging environment
  • master is the production environment
  • enterprise branch is used for self-hosting or on-premise releases. This should remain in sync with master at a regular (monthly) cadence.

Tag summary

Content type

Image

Digest

Size

940.6 MB

Last updated

over 5 years ago

docker pull kloudio/api