First install the testing framework:
npm install mocha --save-dev
npm install chai --save-dev
npm install mocha -g
### Create the database | |
* Plan out your relationships. A category has many tasks, and a task has one category. Or, a task has many categories and a category has one task. | |
* Create a project directory, and change directory into it in your terminal. Then, sign into the MySQL shell: `/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot` | |
* Launch MAMP and start its server. Set its document root to your project folder in Preferences > Web Server by clicking the little folder icon. | |
* Now you can create your tables. Here are the most common SQL commands you will need. | |
* After creating your production database, copy it into your test database by going into phpMyAdmin, selecting the database, selecting the "Operations" tab, and running the copy operation. | |
``` | |
CREATE DATABASE database_name; |
### Create the database | |
* Plan out your relationships. A category has many tasks, and a task has one category. Or, a task has many categories and a category has one task. |