-
Install vagrant
-
Install ansible
-
Clone the project
git clone https://github.com/ppau/project-m.git
-
Start the vagrant vm
vagrant up && vagrant provision
-
Log onto the vm
vagrant ssh
-
Find the project files
cd /vagrant
-
Install dependencies
npm install
-
Add stripe keys [Optional]
1. First option is to add stripe config file: 1. Make a file called stripe-config.json in /config file (see /config/strip-config.json.example for format) 2. Visit [stripe](https://dashboard.stripe.com/test/dashboard) 3. Click your account -> account settings 4. Click API keys 5. Add the ones you wish to use into /config/stripe-config.json (for test and dev) 2. Second option is to declare them at run time: 1. Add STRIPE_SECRET_KEY="somekey" to environment vars 2. Add STRIPE_PUBLIC_KEY="anotherkey" to environment vars 3. Alternatively, define them at runtime before npm start, see below eg: STRIPE_SECRET_KEY="sk_test_randomNumbersAndLetters" STRIPE_PUBLIC_KEY="anotherkey" npm start If you do both options, the run time declaration is used instead of the config file.
-
Email configuration [Optional]
1. Run `which sendmail` in a terminal 2. Add EMAIL_SERVER="Path to sendmail" to environment vars 3. Turn on the toggles for the emails that will be activated in each specific environment (config/default.json, config/staging.json, config/production.json) - For the verification email set "sendEmails" to true
-
Run the tests
npm test
-
Run the acceptance tests
1. First set up a admin email and admin password: export ACCEPTANCE_EMAIL=some email here export ACCEPTANCE_PASSWORD=some password here 2. Start the server: npm start 3. Then run: npm run acceptanceTests
-
Start the server
npm start
-
npm install webpack -g
-
webpack --progress --colors --watch
-
Run server side tests
npm run serverTests
-
Run client side tests
npm run componentTests
-
Run a specific server side test
NODE_ENV=test node --harmony node_modules/jasmine/bin/jasmine.js spec/integration/membersSpec.js
-
Run smoke tests against an external target
NODE_ENV=test INSTANCE_URL=http://myinstance.mydomain.com node --harmony node_modules/jasmine/bin/jasmine.js spec/integration
-
Migrate the database (run automatically as part and npm start or npm test)
./node_modules/sequelize-cli/bin/sequelize db:migrate
-
Create an admin user to access the treasurer/secretary views
npm run createAdmin
-
heroku pg:backups capture --app <app_name>
-
curl -o db/dumps/latest.dump
heroku pg:backups public-url
-
(in the vm) pg_restore --verbose --clean --no-acl --no-owner -h localhost -U project-m -d project-m db/dumps/latest.dump
Happy hacking!
- Install plugin
-
Install webstorm
-
Open preferences -> Languages and frameworks
-
Change javascript to ECMAScript 6
-
Setup run configuration to node and "javascript/file" to be bin/www
-
Optionally install vagrant plugin