Amuse is a soundcloud clone where users can share their original music and other users can comment on their posts.
https://amuse-app.herokuapp.com/
- The home page shows the most recent songs posted to the site
- Users can post songs and edit their titles as well as delete the song entirely
- Users can post edit and delete comments on songs
- Logged out users can see the main feed and comments but can not make or edit comments
-
Clone this repository:
git clone https://github.com/arn1215/Amuse_v2.git
-
Install dependencies from the root directory.
npm install
-
Create a user on PostgreSQL (psql) with a PASSWORD and CREATEDB privileges. Remember to include the semicolon ; at the end of the line.
CREATE USER [username] WITH PASSWORD [password] CREATEDB;
-
In the backend directory, create a .env file based on the .env.example file also found in the backend directory.
-
Enter your chosen username and password into the respective fields in the .env file you just created. Enter your chosen database name and PORT. You may enter a secure combination of characters into JWT_SECRET or use the following in node in your terminal to generate a secure string.
require("crypto").randomBytes(32).toString("hex")
-
Add a numeric value to JWT_EXPIRES_IN. By default, you may use 604800 which is the number of seconds in a week.
-
Add the following proxy code to your package.json file in the frontend directory. If you chose any port other than 5000, replace the port number there now.
"proxy": "http://localhost:5000"
- Run the following code in your backend directory to run the creation of the database and migrations as well as to seed the database.
npx dotenv sequelize db:create npx dotenv sequelize db:migrate npx dotenv sequelize db:seed:all
- Start the backend and frontend servers in the backend and frontend directories, respectively. After starting the frontend server, your browser should open the application automatically. If not, navigate to http://localhost:3000
npm start
You can choose to login as a demo user to try out the sites functionality.