| verb | route | body |
|---|---|---|
| GET | courses | |
| GET | courses/:course_id | |
| CREATE | courses | { name } |
| CREATE | courses/:course_id/next-version | |
| UPDATE | courses/:course_id | { name, status } |
| UPDATE | courses/:course_id/move | { new_index } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ` | |
| OBJECT LITERALS TO MAKE INSTANCES | |
| ` | |
| // this is a model of real world object, a dog | |
| const fido = { | |
| name: 'Fido', | |
| breed: 'Rottweiler', | |
| age: 3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| named functions inside objects are called methods | |
| */ | |
| function returnAnObject(name, age) { | |
| const myObject = { | |
| myName: name, | |
| myAge: age, | |
| sleep: function() { | |
| console.log('zzzzz') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function myFunction (age, name) { | |
| arguments[0] | |
| console.log(`my name is ${name} and my age ${age}`) | |
| } | |
| ` | |
| "function" is the keyword that tells JS that we are about |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| For loop for iteration | |
| without an array | |
| */ | |
| for (let i=0; i<10; i++) { | |
| console.log(i) | |
| } | |
| // 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // E X A M P L E 1 (backend specific) | |
| // Objection chaining, using promises | |
| const getDog = (id) => Dog.query() | |
| .findById(id) | |
| const getDog = (id) => { | |
| return Dog.query() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const materials = [ | |
| 'course_work', | |
| 'course_work', | |
| 'exam', | |
| 'project', | |
| 'course_work' | |
| ] |
| branch | description | prune |
|---|---|---|
master |
no | |
backup-new-course-panel |
No idea why we are saving this. | yes |
demo-multi-part-form-modal |
Demonstrates usage of custom MultiPart component along with Semantic Forms and Modals. Is somewhat outdated. |
no |
demo-react-d3-tree |
Demonstrates basic usage of react-d3-tree package and nesting React components within it. |
no |
| branch | description | prune |
|---|---|---|
master |
no | |
backup-dev-materials |
Backup of original schema code for materials. | no |
demo-singletable |
Demonstrates concrete table inheritance, specifically parent having one and only one of a concrete class instance. | no |
demo-singletable-mod |
Demonstrates class table inheritance. | no |