Coder Social home page Coder Social logo

gfw-area-notifications's Introduction

GFW Area Notifications Microservice

Build Status Test Coverage

Dependencies

You will need Control Tower up and running - either natively or with Docker. Refer to the project's README for information on how to set it up.

The node-skeleton microservice is built using Node.js, and can be executed either natively or using Docker, each of which has its own set of requirements.

Native execution requires:

Execution using Docker requires:

Getting started

Start by cloning the repository from github to your execution environment

git clone https://github.com/vissuality/gfw-api/gfw-area-notifications.git && cd gfw-area-notifications

After that, follow one of the instructions below:

Using native execution

1 - Set up your environment variables. See dev.env.sample for a list of variables you should set, which are described in detail in this section of the documentation. Native execution will NOT load the dev.env file content, so you need to use another way to define those values

2 - Install node dependencies using NPM:

npm install

3 - Start the application server:

npm start

The endpoints provided by this microservice should now be available through Control Tower's URL.

Using Docker

1 - Create and complete your dev.env file with your configuration. The meaning of the variables is available in this section. You can find an example dev.env.sample file in the project root.

2 - Execute the following command to run Control tower:

./gfw-area-notifications.sh develop

The endpoints provided by this microservice should now be available through Control Tower's URL.

Testing

There are two ways to run the included tests:

Using native execution

Follow the instruction above for setting up the runtime environment for native execution, then run:

npm test

Using Docker

Follow the instruction above for setting up the runtime environment for Docker execution, then run:

./gfw-area-notifications.sh test

Configuration

Environment variables

  • PORT => TCP port in which the service will run
  • NODE_PATH => relative path to the source code. Should be app/src
  • CT_REGISTER_MODE => if auto the microservice automatically registers on Control Tower on start
  • CT_TOKEN =>
  • API_VERSION => API version identifier that prefixes the URL. Should be v1

You can optionally set other variables, see this file for an extended list.

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.