Git Product home page Git Product logo

api.eauw.org's Introduction

api.eauw.org

A web API to facilitate automations and services relevant to our organization including adding emails to the mailing list, sending emails, and reading calendar events. Co-authored with Eeshaan Pirani.

Getting Started

Requirements

Create an .env file

cp .env.example .env

Google Service Account Credentials

  1. Create a new project in the Google Cloud Console.
  2. Enable the Admin SDK API, the Google Spreadsheets API, and other APIs as needed.
  3. Create a new service account and export the JSON credentials.
    • A valid JSON will have "type": "service_account" as the first key-value pair.
  4. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of the JSON.

Note: API calls can only be made if the "subject" field in the body is set to an admin of the Google Workspace. Set GOOGLE_WORKSPACE_ADMIN_ACCOUNT to the email address of an admin in your workspace.

SMTP Credentials

Set the environment variables SMTP_HOST, SMTP_USER, and SMTP_PASS. By default, the application uses port 465 for secure transfer. It can be changed in processes/confirmationEmail.process.ts if needed.

Set resources

  1. Set the environment variable SPREADSHEET_ID to the ID of the Google Spreadsheet you'd like to append to.
  2. Set the environment variable GROUP_ID to the ID of the Google Group you'd like to add members to.

Running

Option 1 — Using Docker (Preferred)

docker-compose build
docker-compose up

Option 2 — Using Node and pm2

npm i
npm i -g pm2
npm run build && pm2 start

api.eauw.org's People

Contributors

dviggiano avatar

Stargazers

 avatar

Watchers

 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.