Skip to content

Work in progress! SPA using the Spotify Web API that suggests a playlist for a song

Notifications You must be signed in to change notification settings

herrlax/Suggestor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Suggestor

Suggests Spotify playlist based for current playing song

Setup

This monorepo both includes the Suggestor back-end app and front-end app:

  • @suggestor/backend-app
  • @suggestor/client

Building

The whole application build into packages/backend-app/build, using react-scripts and tsc. Before building, make sure all dependencies are installed and that there is a build directory in packages/backend-app/.

The server is written in TypeScript and is transpiled into JavaScript using tsc by running yarn build in packages/backend-app.

The front-end is built using react-scripts, by running yarn build in packages/client

Env variables

server.ts is using environment variables to connect to the Spotify API. Add the following env variables to .env file in project root:

Running the frontend locally

The React frontend can be found in ./client and can be started locally for development, but needs a mocked server to work properly.

  • Install dependencies: yarn install
  • Start FE: yarn start

Running the project w/ server πŸƒβ€β™‚οΈ

Run with mocked server and fetch:

  • In ./client, build the frontend with REACT_APP_MOCK_ENABLED=true to enable mocked fetch response: yarn build:mock (or build:watch-mock for watch mode). The FE is now built in ./client/build.
  • In root, run yarn start:mock. The node server now runs at localhost:8888

Running without mocked server and fetch:

  • In ./client, build the frontend without mocked fetch response: yarn build (or build:watch for watch mode). The FE is now built in ./client/build.
  • In root, run yarn start. The node server now runs at localhost:8888

About

Work in progress! SPA using the Spotify Web API that suggests a playlist for a song

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published