- Install Node.js: https://nodejs.org/en/
- Get a Spotify account
- Go to
https://developer.spotify.com/dashboard/applications - Create an app, then in it's overview go to EDIT SETTINGS
- Add those as Redirect URIs, remember to actually click Add
http://localhost:5000/callbackhttp://localhost:5000/panelcallback
- SAVE
- Make sure npm is installed:
npm --version - Go to project root and
npm install - Rename
envtemplateto.env - Replace placeholder
!!!with Client ID and Client Secret fromhttps://developer.spotify.com/dashboard/applications.
- Go to project root and
npm start
- Perform the steps described in Hosting locally section
- Go to
/clientandnpm installto prepare React app for development - Adjust environment variables (
.env) to use React's port during development- Alternatively, each time you update React app
npm buildinclientand copyclient/buildfolder tosrc/views
- Alternatively, each time you update React app
- Open two terminals
- First terminal - backend:
- Go to project root and
npm start - You should see a line similar to this:
18:49:28.735 INFO Follify back-end started on port 5000 - Done!
- Go to project root and
- Second terminal - frontend:
- Go to
/clientandnpm start - You should see something similar to code block below
- React page should automatically open in your browser. If not, go to
http://localhost:3000
- Go to
Compiled successfully!
You can now view follify in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.8.162:3000
Note that the development build is not optimized.
To create a production build, use npm run build.
webpack compiled successfully
- Set
REACT_APP_PATHinclient/.envto url of your deployed app. - Build the React app by running
npm run buildinclient - Copy
client/buildtosrc/views. This step is not automated in case React app contains experimental changes. - Run deployment script with
npm run deploy. The script will output complete compiled app indist. - The script will force-push contents of
distto a github repo so that it can be imported on a hosting service. Editdeploy.jsto change that repo's link or disable that behavior. - Import the packaged code on your hosting service
- Set environment variables by analogy to those in
.env. SetNODE_ENV=production - Install dependencies with
npm install - Start the app with
npm start