Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
asching7108 committed Aug 11, 2020
1 parent 4c01e94 commit 8a7243d
Showing 1 changed file with 62 additions and 18 deletions.
80 changes: 62 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,72 @@ Task management system for streamlining workflows with projects, tasks, and subt

## How to Install:

1. Clone this repo.
- Clone this repository to your local machine: `git clone REPO-URL NEW-PROJECTS-NAME`

2. Copy "config~template.js" to a file named "config.js".
- `cd` into the cloned repository

3. Customize the settings in "config.js" to match the settings in your database (and choose unique encryption secrets).
- Make a fresh start of the git history for this project: `rm -rf .git && git init`

4. Log in to your database and run the SQL queries in "EC3_DDL.sql".
- Install dependencies: `npm install`

5. Run "npm install".
- Setup a MySql database for this project

6. Run "node index.js 12345" (replacing "12345" with the port you wish to use).
- Prepare environment file: `cp example.env .env`

7. Open a web browser and point it to the correct URL (e.g. "http://flip1.engr.oregonstate.edu:12345/").
- Replace values in `.env` with your custom values

8. To see sample data, log in as "[email protected]" using the password "password".
## SQL Database Setup

## High-Level Software Architecture
- Log in to your MySql database and run the SQL queries in `EC3_DDL.sql` file

![Three-Tiered Software Architecture](https://github.com/sarahforest/cs361/blob/master/architecture.png)
- Or, if you have installed MySql on your local machine, execute with command:
```
$ mysql --host=HOST_NAME --user=USER_NAME --password=PASSWORD --reconnect DATABASE_NAME < MIGRATION_FILE
```

## SQL Database Setup
- Sample data included in the SQL queries

## Scripts

- Start application: `npm start`

- Start application for development: `npm run dev`

## Deploying on Heroku

- Prerequisites: Install Git and the Heroku CLI

- Creating a Heroku remote: `heroku create`

- Renaming remotes: `git remote rename heroku heroku-staging`

- Deploying code: `git push heroku master`

- [References](https://devcenter.heroku.com/articles/git)

See "EC3_DDL.sql".
## Configuring MySQL on Heroku

- Prerequisite: Deploy application to Heroku

- Add ClearDB to the application:
```
$ heroku addons:create cleardb:ignite
```

- Use `heroku config` to get the `CLEARDB_DATABASE_URL` value

- Copy the `CLEARDB_DATABASE_URL` value and assign it to the db connection variables in `.env`

- Setup database with migration:
```
$ mysql --host=HOST_NAME --user=USER_NAME --password=PASSWORD --reconnect DATABASE_NAME < MIGRATION_FILE
```

- [References](https://devcenter.heroku.com/articles/cleardb)

## High-Level Software Architecture

![Three-Tiered Software Architecture](https://github.com/sarahforest/cs361/blob/master/architecture.png)

## Authentication

Expand Down Expand Up @@ -57,15 +100,16 @@ See "EC3_DDL.sql".
email: '[email protected]'
}
```

## Documentation

Make sure you run ```npm install``` to install jsdoc (it is listed in package.json)
- Navigate to the jsdoc folder. `mkdir jsdoc && cd $_` if it does not exist

Navigate to the jsdoc folder. ```mkdir jsdoc && cd $_``` if it does not exist
- Running the documentation generator on the command line
`../node_modules/jsdoc/jsdoc.js ../index.js` (path to jsdoc.js) (path to yourFile.js)

Running the documentation generator on the command line
```../node_modules/jsdoc/jsdoc.js ../index.js``` (path to jsdoc.js) (path to yourFile.js)
- This command will create a directory named out/ in the current working directory

This command will create a directory named out/ in the current working directory. Within that directory, you will find the generated HTML pages (e.g. yourFile.html).
- Within that directory, you will find the generated HTML pages (e.g. yourFile.html)

[JSDOC Documentation](https://jsdoc.app/)
- [JSDOC Documentation](https://jsdoc.app/)

0 comments on commit 8a7243d

Please sign in to comment.