Giter Club home page Giter Club logo

ip-info-dump's Introduction

ip-info-dump

A simple serverless function that pulls info together from various locations and spits it back up in a simple format.

Project structure

There are two directories of note: env and src

env should contain all files relevant to deployment while src contains all files relevant to the actual code and its tests.

Shell scripts to facilitate testing and deployment are in the root directory.

Setup

There are two files that contain environment variables: prod.tfvars and local.env.sh.

The first is a var file for terraform to understand any environment variables that need to be loaded.

The second is a shell script to load any environment variables that need to be loaded locally.

The only environment variable that is relevant is IPDUMP_VT_KEY, which is a VirusTotal API key.

There are example versions of both (env/prod.example.tfvars and local.example.env.sh) in the repo. For security, the actual files have been added to the .gitignore.

Once created, and the local environment set up for AWS, one can simply run ./deploy.sh and ./test.sh to either (re)deploy the code to AWS or to test the code locally, respectively. test.sh will also provide a coverage report via go test's -cover option.

You do not need to be in the root directory to run these scripts.

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.