Skip to content

Commit

Permalink
Fix deployment settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettes committed Jan 7, 2019
1 parent 0a7c46c commit 6c5a629
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ Run: `python -m unittest discover geodepy/tests/`

See [here](https://github.com/GeoscienceAustralia/GeodePy/tree/master/docs/tutorials) for worked examples of common GeodePy functions and routines.

## API

```
cd api/
virtualenv env
source env/bin/activate
pip install -r requirements.txt
zappa deploy dev
```

For subsequent updating run: `zappa update dev`

### Authors

* **Craig Harrison** - *Project Management* - [harry093](https://github.com/harry093)
Expand Down
6 changes: 6 additions & 0 deletions api/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from flask import Flask
from flask import request
from flask import url_for
from geodepy.geodesy import vincdir
from geodepy.geodesy import vincinv
from geodepy.convert import dms2dd
Expand All @@ -18,6 +19,11 @@
}


@app.route('/')
def list_routes():
return str(tuple(url_for(rule.endpoint) for rule in app.url_map.iter_rules() if rule.endpoint != 'static'))


@app.route('/vincinv')
def handle_vincinv():
from_coord = request.args.get('from_coord')
Expand Down
3 changes: 2 additions & 1 deletion api/zappa_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"dev": {
"project_name": "geodepy-api",
"s3_bucket": "geodepy-api-dev",
"app_function": "api.app"
"app_function": "app.app",
"use_precompiled_packages": true
}
}

0 comments on commit 6c5a629

Please sign in to comment.