- npm install
- Here are the instructions for installing and running postgresql: https://hratx-students.slack.com/files/megan.rabuse/F4HMU4URL/how_to_install_use_postgressql_for_mac.txt Warning: these are instructions for installing postgresql on a Mac. If you have a windows computer, good luck?
- Once psql is running, create your database
- Navigate into the echoes directory in terminal
- Enter:
createdb echoes
- Enter:
knex migrate:latest
- To access database in terminal:
psql echoes
Highly recommended that you install Postico. Like DB Browser for SQLITE, it will allow you to view and interact with your database easily.
Utilizes postgresql. It is being run in db.js. You'll notice two environments: development and environment. If you are running the app locally on your computer, make sure 'env' in db.js is equal to development. If you are deploying on a site like heroku that can run it's own postgresql database, set 'env' to production.
While in development, if you wish to log the sql commands that knex runs in your terminal, uncomment 'debug:true'
Seed data is pre-fabricated data that allows you to interact with a filled database without making a billion calls to the API.
- Comment out all foreign key constraints in the migration file
- Run:
knex migrate:rollback
followed byknex migrate:latest
- Run:
knex seed:run
- Comment foreign key constraints back in
- Run:
knex migrate:rollback
followed byknex migrate:latest
- To view console logs for server request, go into the knexfile and uncomment 'debug: true'. Then, any time you make changes server side:
- Run:
npm start
(This recompiles your changes, which is what the app is reading) - Exit out of npm start using ctrl-c (npm start, while running the server, will not show console logs)
- Run:
node server/server.js
(This will restart the server w/o recompiling, but allows you to view your server-side console logs)
npm start
the terminal will hang after compiling spec/serverSpec.js so then push ctrl-cnode server/server.js
on the same terminal window after ctrl-c, leave this window running- Navigate to localhost:1337 on your browser
- Create a heroku app and attach a postgresql add-on to it. That will automatically create the env var 'DATABASE_URL'
- Recompile data by running
npm start
or in cl:babel . --watch --out-dir compiled --presets=es2015,react --ignore=node_modules,compiled --source-maps inline
- Comment out 'compiled/' in gitignore
- Make var env in db.js set to production.
- git add/commit
- Run:
git push heroku master
- If this is your first time setting up your database, run:
heroku run knex migrate:latest
- You're reading to go!
- Implement a pages view so that you dont have to scroll continuously to view old albums
- Implement a filter to rank albums by rating, date, or other criteria
- Use the iTunes genius api or another service to recommend new albums a user may be interested
- Add albums based on listening to a sound sample, like Shazam
- Implement a more robust authentication system
- Add a queue of new albums to checkout in the future
- Integrate with Spotify so that when a new album is listened to that album is automatically added
- Automate babel compiling
- Add pop out module of albums (including list of songs for each album)