diff options
| author | Yuval Adam <_@yuv.al> | 2017-11-17 18:56:28 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2017-11-17 18:56:28 +0200 |
| commit | f09a791a0acf9d668d6322d887c1519afaac964f (patch) | |
| tree | cb170239d379d9510aee8e9f5357426dd7cdc8bb | |
| parent | fcd120097d3ad16962d71e7ff17deb1053f14041 (diff) | |
Fix some shit
| -rw-r--r-- | Geshem.vue | 12 | ||||
| -rw-r--r-- | README.md | 13 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | static/error.html | 20 |
4 files changed, 38 insertions, 9 deletions
@@ -56,7 +56,7 @@ computed: { datetime: function () { if (!this.imgs) { return '' }; - var d = this.imgs[this.res][this.slider].substr(0, 13); + var d = this.imgs[this.res][this.slider].substr(5, 13); var md = moment.utc(d, 'YYYYMMDD/HHmm').tz('Asia/Jerusalem'); return md }, @@ -71,12 +71,18 @@ }, mounted: function () { var vm = this; - axios.get('//imgs.geshem.space/imgs.json').then((res) => { + axios({ + url: '//imgs.geshem.space/imgs.json', + method: 'get', + withCredentials: true + }).then((res) => { vm.imgs = res.data; if (vm.mapLoaded) { vm.loadSources(); } - }) + }).catch(function(error) { + console.log(error) + }) }, created: function () { this.initMap(); @@ -3,8 +3,9 @@ An interactive rain radar clone running on Mapbox GL, see it live at: [https://geshem.space](https://geshem.space) The entire service is served off of static assets located in S3 buckets: - - A static main index page, JS bundle and other static assets that are uploaded upon deploy - - Radar images that collected and indexed every minute by a recurring task running on AWS Lambda + + - A static main index page, JS bundle and other static assets that are uploaded upon deploy, Vue.js-based + - Radar images that are collected and indexed every minute by a recurring task running on AWS Lambda, written in Python ## Prerequisites @@ -31,7 +32,7 @@ $ yarn run build Deploy new static assets to S3: ```bash -$ yarn run deploy_static +$ yarn run deploystatic ``` ### Cron Task @@ -39,11 +40,13 @@ $ yarn run deploy_static #### Deploy ```bash -$ yarn run deploy_cron +$ yarn run deploycron ``` #### Invoke +For testing the cron task: + ```bash -$ yarn run invoke_cron +$ yarn run invokecron ``` diff --git a/package.json b/package.json index 715b4f4..7f2b39e 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "scripts": { "build": "NODE_ENV=production webpack --config ./webpack.config.js --progress --colors", - "deploystatic": "whoami", + "deploystatic": "aws s3 sync --acl public-read static s3://geshem.space", "deploycron": "serverless deploy -f update", "invokecron": "serverless invoke -l -f update" }, diff --git a/static/error.html b/static/error.html new file mode 100644 index 0000000..8b515fa --- /dev/null +++ b/static/error.html @@ -0,0 +1,20 @@ +<!doctype html> +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> + <title>404 - Geshem.space</title> + <link rel="apple-touch-icon" href="/img/apple-touch-icon.png"> + <script type="text/javascript"> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create', 'UA-71416554-1', 'auto'); + ga('send', 'pageview'); + </script> + </head> + <body> + <h1>404</h1> + </body> +</html> |
