Setting Up Local Development Environment for SoniQube - yacheng3249/SoniQube GitHub Wiki
Client
- Open a terminal and navigate to the client folder in the project directory.
- Run
npm installto install the necessary dependencies. - Create a new file called
.envwith the following contents:REACT_APP_JAMENDO_CLIENT_ID=your_jamendo_client_idReplaceyour_jamendo_client_idwith the actual client ID you obtained from Jamendo API. - Once the installation process is complete, run
npm startto start the application.
Server
- Open a terminal and navigate to the server folder in the project directory.
- Run
npm installto install the necessary dependencies. - Modify the
providername ofdatasource dbin theprisma/schema.prismafile according to the database you are using. - Create a new file called
.envwith the following contents:
ReplaceDATABASE_URL=your_database_url JWT_SECRET=your_jwt_secret SALT_ROUNDS=your_bcrypt_salt_roundsyour_database_urlwith the actual URL for your database,your_jwt_secretwith a secure secret key for JSON Web Tokens, andyour_bcrypt_salt_roundswith a number for the number of salt rounds to use for bcrypt password hashing. - Run
npx prisma migrate dev --name your_migration_nameto generate a new migration in theprisma/migrationsfolder. - Verify that the migration was successful by checking the database to see if the changes were applied.
- Once the installation process is complete, run
npm startto start the server.
Jamendo API client ID
- Go to the Jamendo Developer Console and create an account if you don't already have one.
- After creating an account on Jamendo, an application will be automatically created for you
- Once you're logged in, click on the "Dashboard/Applications" tab in the navigation menu.
- Click on the application that was automatically created for you to view your client ID.