-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e3de09
commit a15ea17
Showing
1 changed file
with
23 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,30 @@ | |
|
||
Virtualize Your Strava Workouts | ||
|
||
## How to get access token | ||
## Build | ||
|
||
Follow the following document to get Access token | ||
``` | ||
git clone [email protected]:bahattincinic/fitwave.git | ||
cd fitwave | ||
make | ||
``` | ||
|
||
https://developers.strava.com/docs/getting-started/#:~:text=Access%20tokens%20are%20required%20for,tokens%20expire%20every%20six%20hours. | ||
## Run | ||
|
||
Step 1: | ||
http://www.strava.com/oauth/authorize?client_id=30980&response_type=code&redirect_uri=http://localhost/exchange_token&approval_prompt=force&scope=read,activity:read | ||
Run project with the following command; | ||
|
||
Step2: | ||
curl -X POST https://www.strava.com/oauth/token \ | ||
-F client_id=30980 \ | ||
-F client_secret=d8d5256cc59c20e49d984d412377604e8dfb6052 \ | ||
-F code=fe297327dc6a6ddd5e81705e25dc248f7dda2a88 \ | ||
-F grant_type=authorization_code | ||
./fitwave | ||
|
||
If you need to override the configuration, create .env file | ||
|
||
## Environment Variables | ||
|
||
| Field Name | Type | Default | Options | | ||
|-----------------------|---------|------------|-------------------------------------------------------------------------------------| | ||
| ENV | string | local | - local<br/>- testing<br/>- production | | ||
| LOG_LEVEL | string | debug | - debug<br/>- info<br/>- warn<br/>- error<br/>- panic<br/>- fatal | | ||
| LOG_OUTPUT | string | stdout | - stdout<br/>- /foo/bar/fitwave.log | | ||
| DATABASE_DSN | string | fitWave.db | - fitWave.db<br/>- host=db user=postgres password=postgres dbname=fitwave port=5432 | | ||
| DATABASE_TYPE | string | sqlite | - mysql<br/>- postgresql<br/>- sqlite | | ||
| DATABASE_AUTO_MIGRATE | boolean | true | - true<br/>- false | | ||
| API_PORT | integer | 9000 | | |