Coder Social home page Coder Social logo

domain-service's Introduction

domain-service fn

This functions for (fnproject.io) receives a json via stdin with id of dns_hosted_zone and action then create a hosted_zone in aws (using route53).

actions enabled:

  • create_hosted_zone
  • refresh_frontend

input format for create_hosted_zone action

{
  "id":"community_id",
  "domain":"domain.example.org",
  "action":"create_hosted_zone",
  "api_key": "jwt_token_hs512_with_jwt_secret"
}

input format for refresh_frontend

{
  "id":"mobilization_id",
  "action":"refresh_frontend",
}

output format example

{
  status: "200",
  response: "domain_name"
}

how use

git clone https://github.com/nossas/domain-service.git
cd domain-service

fn apps config s YOUR_APP DATABASE_URL postgres://connection_string
fn apps config s YOUR_APP AWS_REGION aws_region
fn apps config s YOUR_APP AWS_ACCESS_KEY_ID aws_access_key_id
fn apps config s YOUR_APP AWS_SECRET_ACCESS_KEY aws_secret_access_key
fn apps config s YOUR_APP AWS_ROUTE_IP aws_route_ip
fn apps config s YOUR_APP JWT_SECRET jwt_secret_key
fn apps config s YOUR_APP DEFAULT_PUBLIC_BACKEND_URI http://backend.public
fn apps config s YOUR_APP CONSUL_URI http://consul.host
fn apps config s YOUR_APP CONSUL_ACL_TOKEN consulacltoken

fn deploy --app YOUR_APP --local

calling the function via fn cli

echo JWT_TOKEN_WITH_JSON_STRUCT | fn call YOU_APP /domain-service

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.