tweetyourbracket/api tweetyourbracket/api


The API for Tweet Your Bracket.

https://tyb-api.now.sh

Host: GitHub

Language: JavaScript


bc-api

The API for bracket.club.

Build Status Greenkeeper badge

https://bc-api.now.sh

Routes

Users

  • /users/:id
  • /users/:id/:sport-:year

Entries

  • /entries/:sport-:year
  • /entries/:id

Masters

  • /masters/:sport-:year

Starting the API

Locally

npm install
npm start

Production

# Make sure the POSTGRES_URL secret exists in the .env file
touch .env
echo "POSTGRES_URL=<TOTES_SECRET_CONN_STRING>" >> .env

# Deploy to bc-api
npm run deploy

# If you're happy with the deploy
# API will now be accessible from https://bc-api.now.sh
now run deploy:alias

# If you want to cleanup old deployments
npm run deploy:purge
npm run deploy:list # to confirm

Exporting Data

By default this will use variables from getconfig and write data to the bracket.club client repo (which should be located as a sibling of this repo).

npm run export

If you wanted to export stuff from production:

NODE_ENV=production npm run export

Project Statistics

Sourcerank 3
Size 506 KB
Stars 1
Forks 0
Watchers 1
Open issues 0
Dependencies 27
Contributors 2
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Luke Karrys Greenkeeper

Something wrong with this page? Make a suggestion

Last synced: 2017-06-18 23:37:34 UTC

Login to resync this repository