Skip to content

Instantly share code, notes, and snippets.

View dianedouglas's full-sized avatar

Diane Douglas dianedouglas

View GitHub Profile
### 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;
@dianedouglas
dianedouglas / gist:b32fc3107f0bce465e542a2c04be055f
Created September 21, 2016 13:44
CRUD applications in Silex
### 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.
@dianedouglas
dianedouglas / testing.md
Last active October 31, 2021 21:20
Testing with Mocha and Chai from the command line

Testing from the commandline

First install the testing framework:

npm install mocha --save-dev
npm install chai --save-dev
npm install mocha -g