Skip to content

An example API app in Go that tests a user's WNT16 and FAM3C genes for unbreakable bones.

Notifications You must be signed in to change notification settings

23andMe/api-example-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api-example-bones

An example API app in Go that checks a user's WNT16 and FAM3C genes for unbreakable bones. Clone the repository, and look at the .env file to see what environment variables must be set.

Your env's REDIRECT_URI must match the one on your developer dashboard at https://api.23andme.com/dashboard/. Locally you'll probably want http://localhost:PORT/receive_code/.

Heroku

I host the app on Heroku.

I change CLIENT_ID and CLIENT_SECRET to match my API credentials, and delete the PORT variable because Heroku sets it automatically.

heroku config:set CLIENT_ID=xxx
heroku config:set CLIENT_SECRET=xxx
heroku config:set COOKIE_SECRET=xxx
heroku config:set SESSION_NAME=api-example-bones
heroku config:set SESSION_ACCESS_TOKEN_KEY=xxx
heroku config:set REDIRECT_URI=http://yourapp.com/receive_code/
heroku config:unset PORT

Local

Just set your environment variables, build the program, and run it:

go build
./api-example-bones

About

An example API app in Go that tests a user's WNT16 and FAM3C genes for unbreakable bones.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published