Skip to content

dreedsanders/pureHoops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auth-login

Monorepo with a React client, a Rails JSON API, and a small Node service that scrapes stream metadata for the games widget.

Ports

Service Directory Port Role
Rails API auth-back 3000 (use PORT=3000; Puma’s fallback in config/puma.rb is 3001) Posts, users, auth, etc.
React (dev) auth-login 3000 by default, or 3001 if 3000 is in use Browser UI
Stream scraper stream-scraper 4000 GET /stream for NBA game links

The React app calls the API at http://localhost:3000 and the scraper at http://localhost:4000. Run Rails on 3000 so those URLs work.

Prerequisites

  • Node.js (LTS recommended) and npm
  • Ruby 2.6.x and Bundler (see auth-back/Gemfile)
  • SQLite (used by Rails in development)

1. Rails API (backend)

cd auth-back
bundle install
rails db:prepare   # or: rails db:create db:migrate
PORT=3000 bundle exec rails server

Leave this running. The API listens at http://localhost:3000 (with PORT=3000).

2. React app + stream scraper (frontend + scraper)

From a second terminal:

cd auth-login
npm install
npm start

This runs both:

  • stream-scraper on port 4000 (npm run start:scraper)
  • React dev server (npm run start:react)

Logs are prefixed scraper and web. Stopping the process (Ctrl+C) stops both.

Run only the React app (no scraper)

cd auth-login
npm run start:react

Run only the stream scraper

cd stream-scraper
npm install
npm start

Full stack checklist

  1. Terminal A — Rails API: cd auth-back, then PORT=3000 bundle exec rails server.
  2. Terminal B — React + scraper: cd auth-login && npm start.

The client calls the API at http://localhost:3000, so keep Rails on 3000. Create React App also wants port 3000 by default, so start Rails first; when you run npm start, accept using another port for the dev server (for example 3001) if prompted. Open the URL that Create React App prints in the terminal.

The stream scraper listens on 4000 and is started automatically by npm start in auth-login. Clarifying the React vs Rails port conflict in the README.

<|tool▁calls▁begin|><|tool▁call▁begin|> StrReplace

About

basketball social media and virtual game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors