diff --git a/README.md b/README.md index e6cf734..7ee2467 100644 --- a/README.md +++ b/README.md @@ -21,15 +21,41 @@ The more users they refer, the higher they move up in the queue, and the more fr ## Installation and Setup -1. Spin up a MySQL server (requires version 5.6.5 or greater) and create a new database named "schemeBeam" -2. In the command prompt, enter `mysql -u [your username] -p schemeBeam < schemeBeamDB.sql` to import the database structure -3. Run `npm install` -4. Create a [SendGrid](https://www.sendgrid.com) account. The first 12,000 emails sent are absolutely free. Go to the settings tab and click on "API Keys". Create a general API key and paste it into adminConfig.js (remember to use the actual API key and not the API key ID, happens to everyone) -5. Create a list for your collected emails under "Marketing Campaigns" in SendGrid. Add the ID of your list to the adminConfig file (while very useful, this is technically optional. You can download a CSV of your email list in the admin panel) -6. Finish changing your credentials in adminconfig.js, and customize your app settings in settingsconfig.js. Run `webpack` to finalize changes. -7. Change the background image in the CSS file to fit your company's branding -8. Ready to deploy, run app.js +1. Spin up a MySQL server (requires version 5.6.5 or greater) and create a new database named "schemeBeam". See below how to set up MySQL if needed. +2. In the command prompt, enter `mysql -u [your username] -p schemeBeam < schemeBeamDB.sql` to import the database structure. +3. Run `npm install`. +4. Create a [SendGrid](https://www.sendgrid.com) account. The first 12,000 emails sent are absolutely free. Go to the settings tab and click on "API Keys". Create a general API key and paste it into adminConfig.js (remember to use the actual API key and not the API key ID, happens to everyone). +5. Create a list for your collected emails under "Marketing Campaigns" in SendGrid. Add the ID of your list to the adminConfig file (while very useful, this is technically optional. You can download a CSV of your email list in the admin panel). +6. Finish changing your credentials in `config/adminconfig.js`, and customize your app settings in `config/settingsconfig.js`. Run `webpack` to finalize changes. +7. Change the background image in the CSS file to fit your company's branding. +8. Set `port` in `config/adminConfig.js` to the port of your choice (e.g. 8000). +9. Ready to deploy, run app.js using: `node app.js`. +10. Visit `http://localhost:8000` or whatever port you chose and you should see the running app. +## Setting up MySQL + +To install and setup MySQL follow do as follows: + +Download and install MySQL for Mac from here:(https://dev.mysql.com/doc/refman/5.6/en/osx-installation-pkg.html). + +Note down the password at the end of the installation. + +Open `~/.bash_profile` on your computer and add the following to it: + +``` +alias mysql=/usr/local/mysql/bin/mysql +alias mysqladmin=/usr/local/mysql/bin/mysqladmin +``` + +Run `mysql -u root -p` and enter the password from the end of the installation. + +Set a new password by running this line: +`SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mySuperSecretPassword');` + +Exit out of mysql by entering `exit`. + +Create the "schemeBeam" database with the following command: +`mysqladmin -u root create schemeBeam -p`. ## License diff --git a/package.json b/package.json index c540099..0404846 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,9 @@ "name": "schemebeam", "version": "1.0.0", "description": "Open source viral marketing tool", - "main": "index.js", + "main": "app.js", "scripts": { + "start": "node app.js", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Jeremy Barbe",