Skip to content

Vue, SCSS - Music community app - IS216 Web Application Development II - Oct 2021

Notifications You must be signed in to change notification settings

constanxe/KayaJam

Repository files navigation

KayaJam

Skip to the section on starting the app if you have successfully ran it before.

🚧 Else, if running the app for the first time:

1. Pre-requisites

Ensure you have the following.

  • JAVA_HOME environment variable set to your Java SDK location. (If not, see FAQ)
  • .env.local in the root directory. (If not, see FAQ)
  • Node.js installed. (If not, download at https://nodejs.org/en/download/. This is for npm)

2. First-time set up

  • Run npm i -g json-server.
  • Run npm i at the root directory.
  • Unzip keycloak-15.0.2.zip in the server folder.

3. Start up

Go to the .scripts folder and run all the files. (Made for Windows. Edit the contents according to your OS if needed)

⚠️ Do not close these windows - leave them all running at the same time.

The following should now be accessible at localhost at these ports by default.

  • Client: 8081
  • Keycloak: 8080
  • Database: 3000

If otherwise specified by any of your CLI windows, do the following.

  • Client: Ensure the publicPath in vue.config.js is the same.
  • Other: Edit the .env file to reflect those ports for VUE_APP_JSONSERVER_URL or VUE_APP_KEYCLOAK_URL.

If first-time user, register for an account. (If no verification email, check your spam inbox or quarantine page)

FAQ

Structure for .env.local

Use the following format and add your client keys and secrets for Spotify and PubNub accordingly for the functioning of the data and chat features.

VUE_APP_SPOTIFY_CLIENT_ID=
VUE_APP_SPOTIFY_CLIENT_SECRET=
VUE_APP_PUBNUB_PUB_KEY=
VUE_APP_PUBNUB_SUB_KEY=

Java setup

  1. Download the JDK. (https://www.oracle.com/java/technologies/downloads/)
  2. Run the installation. Take note of the JDK download path.
  3. Go to your System Properties > Advanced > Environment Variables.
    • Under System environment variables, click New and fill in the following for the respective fields:
      • Name: JAVA_HOME
      • Value: < JDK download path >
    • Find your Path environment variable and click Edit. Add this to the end of the string or otherwise:
      • < JDK download path >\bin

Security error for running json-server

"...cannot be loaded because running scripts is disabled on this system"

Possible solution:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

About

Vue, SCSS - Music community app - IS216 Web Application Development II - Oct 2021

Topics

Resources

Stars

Watchers

Forks