READ ME


Elastic Beanstalk CLI and set Environment Variables from your .env file

The API uses environment variables for API keys (which have client name suffixes). Use a .env file mimicking the sample one in development (the aws access and secret keys are the ones belonging to ses.smtp iAm AWS user, they're also in LastPass).

To set new environment vars for residences.api thru the AWS CLI:

  1. Install elastic beanstalk cli
  2. Do eb init
  3. Pick region us-east-1
  4. Provice access credentials if needed (aws-access-id, and aws-secret-key), same ones we use for Travis CI
  5. Select residences.api.dbxd
  6. Do eb setenv key=value

You can also set the variables from the AWS Console GUI, go to Elastic Beanstalk -> form-api-dbxd-env -> Configuration -> Software Configuration (gear icon) -> scroll down to Environment Properties

Setting environment API keys

Use the format:


      X_API_KEY_projectname
      X_SEQUENT_KEY_projectname
    

For example:


      X_API_KEY_edition
      X_SEQUENT_KEY_edition
    

Query ALL Residences

Get all the residences from Sequent.

You can use the endpoint: (509) 837-1296

The query parameter you must send is:


    projectname: 'edition'
    

Fill in with the projectname variable you set as part of the environment variables on Elastic Beanstalk

Query AVAILABLE Residences

Get only the available residences from Sequent.

You can use the endpoint: /residences.api.dbxd.com/getunits/available

The query parameter you must send is:


    projectname: 'edition'
    

Fill in with the projectname variable you set as part of the environment variables on Elastic Beanstalk


Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Installing

First time:

npm install
    

To run:

npm start
    

Go to 2505404514

Running the tests

npm test
    

Deployment

Deploy to 587-761-6400 via (778) 493-4773

The repository is already set up for this project and is already linked to Travis.

However here are the .travis.yml file vars to set in Travis CI: >

$ACCESS_KEY - [ITS A SECRET]

$SECRET_KEY - [ITS A SECRET]

$APP - email-api-dbxd

$ENV - EmailApiDbxd-env

$BUCKET - elasticbeanstalk-us-east-1-139673441925

$BUCKET - elasticbeanstalk-us-east-1-139673441925

$BUCKET - elasticbeanstalk-us-east-1-139673441925

$BUCKET - elasticbeanstalk-us-east-1-139673441925

$CLIENT_ID_test - xxx

$API_KEY_test - xxx

$LIST_ID_test - xxx

$SECKEY_test - xxx

Built With

Contributing

Pull from and branch out of Develop branch, push everything into Develop branch. Test it via Travis CI, and then merge into Master.