Task management system for streamlining workflows with projects, tasks, and subtasks shared amongst users.
-
Clone this repository to your local machine:
git clone REPO-URL NEW-PROJECTS-NAME -
cdinto the cloned repository -
Make a fresh start of the git history for this project:
rm -rf .git && git init -
Install dependencies:
npm install -
Setup a MySql database for this project
-
Prepare environment file:
cp example.env .env -
Replace values in
.envwith your custom values
-
Log in to your MySql database and run the SQL queries in
EC3_DDL.sqlfile -
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 -
Sample data included in the SQL queries
-
Start application:
npm start -
Start application for development:
npm run dev
-
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
-
Prerequisite: Deploy application to Heroku
-
Add ClearDB to the application:
$ heroku addons:create cleardb:ignite -
Use
heroku configto get theCLEARDB_DATABASE_URLvalue -
Copy the
CLEARDB_DATABASE_URLvalue 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
-
When successfully registered or logged in, creates an auth token (JWT) containing user id and stores it in session. (Session will preserve across multiple pages.)
-
For protected endpoints that require authentication, use middleware
requireAuththat verifies the auth token in session.-
If the auth token is verified, the user data (id, name, email) will be stored in
req.user. -
Otherwise redirects to homepage.
-
-
Example:
const { requireAuth } = require('./middleware.js'); app.get('/projects', requireAuth, function(req, res) { console.log(req.user); /* more code here */ });Output:
{ id: 1, name: 'Test', email: 'test1@test.com' }
-
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) -
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)
