GithubHelp home page GithubHelp logo

michareiser / backends Goto Github PK

View Code? Open in Web Editor NEW

This project forked from orbiting/backends

0.0 3.0 0.0 2.24 MB

monorepo for republik, publikator and assets backends based on NodeJS providing the GraphQL API used to power republik.ch.

Home Page: https://api.republik.ch/graphiql

License: GNU Affero General Public License v3.0

JavaScript 95.85% PLSQL 0.03% PLpgSQL 3.10% HTML 0.99% Shell 0.03%

backends's Introduction

@orbiting/backends

This repo contains all the backend code in use at Republik. For easier development the previously separate repos republik-backend, publikator-backend, assets-backend and backend-modules where merged into this monorepo.

Components

This repo is devided between servers and packages.

  • servers: this directory contains runnable servers
  • packages: contains code shared between the servers

TODO: system diagram

Usage

ENVs

In development environment variables are loaded from ./.env, ../../.env (in this order, relative to node's cwd). This is done with the help of backend-modules-env and enables you to define a .env file at the root of this repo for common variables and also store server specific envs at servers/*/.env. ./.env takes precedence over ../../.env because existing env variables are never overwritten. No ENV variabeles are loaded from any file in production, you yourself are responsible to set all required ENVs in the production environment.

Checkout .env.example, servers/republik/.env.example, servers/publikator/.env.example, servers/assets/.env.example for which ENVs are required and their descriptions. Check the packages' README for further config options.

At the moment many ENV variables are required for the servers to just run. We are in the process of improving this and deactivate affected functions if ENVs are missing, to provide a smother way of trying out our code.

Quick start

  • You must have node (8.3.0+) installed, postgres and redis running somewhere.
  • Copy the .env.example files to .env (root and server) and adapt them to your needs.
  • Install dependencies with yarn install
  • Run it: yarn run dev

The last command kicks on foreman which then launches all the servers locally.

Caveats

Due to the this bug running bin scripts from the server subfolders doesn't work. Currently the following workaround is in place: test:prepare of republik and publikator first does: rm -rf node_modules/.bin && ln -s ../../../node_modules/.bin node_modules/.

Licensing

The source code and it's documentation is licensed under GNU AGPLv3+.

backends's People

Contributors

lukasbuenger avatar patte avatar pozylon avatar tpreusse avatar uxengine avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.