diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2017-12-28 15:07:01 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2017-12-28 15:07:01 +0200 |
| commit | 04a05206ff197fef47a985a24dfde7ae9c405520 (patch) | |
| tree | d347c13c024d2a8f140e8054a6fc54e9785fca4e /src/api.js | |
| parent | a1c33b51cef94bdec1484aefa3196f733fff123d (diff) | |
Remake a lot of stuff
Diffstat (limited to 'src/api.js')
| -rw-r--r-- | src/api.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/api.js b/src/api.js new file mode 100644 index 0000000..c0c6204 --- /dev/null +++ b/src/api.js @@ -0,0 +1,8 @@ +const get = async path => { + const url = process.env.BACKEND_API_URL; + + const resp = await fetch(`${url}${path}`); + return await resp.json(); +}; + +export default get;
\ No newline at end of file |
