App is running on https://drakescrowd.herokuapp.com
##prereq:
- make sure postgres is installed.
- make sure node is installed.
- running commands such as babel-node may require additional setups (just follow what the terminal tells you to do).
##instructions:
-
clone and cd into this repo
$ git clone https://github.com/yochess/drakescrowd.git && cd drakescrowd
-
install node dependencies
$ npm install
-
create a postgres database named drakescrowd
(ps. you can swap out postgres db for mySQL db or any other supported SQL db in the dbconfig file)$ psql # CREATE DATABASE drakescrowd; # \q
-
OPTIONAL: populate the db with sample data
$ babel-node sampledata.js
-
start the server
$ babel-node ./src/app.js
or (with nodemon)
$ nodemon ./src/app.js --exec babel-node --presets es2015
##Deployment
-
run the gulp build
$ gulp build
-
make sure the production version works
$ env build=production node ./dist/app.js
-
goto www.heroku.com, login (or signup), click create a new project, and follow their instructions
(note: a Procfile is not necessary for our app) -
setup a db in heroku postgres (some research may be necessary)
-
under settings, save the following env variables: ADDRESS="your_link" build=production DATABASE_URL="your_db_link"
##Current Issues:
- uploads storage needs to be permenant. Everytime the current app is pushed to heroku, the uploads folder in the dist folder is ignored. Consider using an online storage or a separate link to host images.