Currently seeking help with these roles:
- Product Development
- User Experience Design
- Taking a look at the issues and throwing in a pr :)
OSX: https://launchschool.com/blog/how-to-install-postgresql-on-a-mac
Connect to psql db from your terminal.
psql postgres
Create the database.
CREATE DATABASE festivus;
Exit from the database.
\quit
Clone repository in your desired directory.
Setup NPM
Download dependencies
npm i
Migrate the database model into postgres (this command must be run while terminal path is inside project)
node_modules/.bin/sequelize db:migrate
Copy .env-example and rename it to .env
Only DATABASE_URL is in use, so just make that one by changing the username and password text.
Follow that path and update your username in the development environment
Thanks to our friend lukas, we have designs!
https://xd.adobe.com/spec/c69b052c-b92d-4747-60e1-03db5ab70ec1-b0aa/
https://i.imgur.com/0TAW4Zw.jpg
Take a look in package.json, 'npm start' runs a script which kicks off bin/www.
Our app.js then builds the rest of our project by specifying our routes.
Express application walkthrough: https://gist.github.com/mdang/0a8e00883b2e25424e05
What are routes? https://expressjs.com/en/guide/routing.html
Let's go through our directories top to bottom:
- contains www which kicks off our app and gets our server running. If there're any issues with port number or specific server issues, look in here.
- This directory contains helper functions for psql. db.js creates our initial connection to the db which we reference in our helper functions.
- NPM is the node package manager, which installs packages locally into a project, specifically, into the node_modules folder.
- Where all of our client side gets loaded like javascript, css, style libraries, etc.
- Currently using uikit.
- Still need to add jQuery, but hbs should be doing the majority of our logic.
- routes get used so our server knows what data to serve the user depending on the url. You can have multiple types of routes depending on GET/POST/PUT/DELETE/etc requests from the user. For example, you can make a post route on /deleteUserWithID:[id] to pass an id with the url parameter to delete that user.
- this directory was automatically generated by sequelize. I don't know why the they chose to automatically generate it if I don't have a server directory but whatever
- This allows us to automatically generate our tables when running sequelize db:migrate.
- Contains all of our frontend templates for handlebars. The files get served up in our routes.
- layout.hbs gets built on every single page. That way things like headers, navbars, footers, etc can be placed on every page without us doing anything.
- if you want to add any components directory, put it in here.
- Contains all of our sensitive information like usernames, passwords, api keys, etc so it can be abstracted and not put up into github.
- The scripts key is where you can check to see what scripts are available or where you can make new scripts for our project.