Allow testing against local auth stack

Summary:
This commit changes how N1 parses config.cson very slightly
so that when "env" is set to "local" N1's auth flow can be
tested against local copies of Nylas' auth servers.

Test Plan: I tested it manually against a local auth stack. It worked!

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: kav-ya

Maniphest Tasks: T6690

Differential Revision: https://phab.nylas.com/D2671
This commit is contained in:
logandavis 2016-03-02 17:50:48 -08:00
parent 9e08d6839c
commit f956cfcf88
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ class EdgehillAPI
_onConfigChanged: =>
env = NylasEnv.config.get('env')
if env is 'development'
if env in ['development', 'local']
@APIRoot = "http://localhost:5009"
else if env is 'experimental'
@APIRoot = "https://edgehill-experimental.nylas.com"

View file

@ -156,7 +156,7 @@ class NylasAPI
@AppID = 'c5dis00do2vki9ib6hngrjs18'
@APIRoot = 'https://api-staging-experimental.nylas.com'
else if env in ['local']
@AppID = 'n/a'
@AppID = NylasEnv.config.get('syncEngine.AppID') or 'n/a'
@APIRoot = 'http://localhost:5555'
else if env in ['custom']
@AppID = NylasEnv.config.get('syncEngine.AppID') or 'n/a'