Hi! My name is Cody! Can you help me build my cafe?!?
First thing's first!
- Fork and clone this repo!
npm installnpm testcreatedb codys_cafe(or if you don't thecreatedbutility, simply create a database calledcodys_cafevia your preferred means)
This runs all the specs you need to build out my cafe api! They of course run with mocha and chai!
I can't wait! This is going to be spec-tacular! Let's get started!
We're building out the cafe's backend! Here's what I have planned:
-
There will be a
Coffeemodel, representing acoffeedatabase table (with all my pup-ular coffee drinks!)- This will go in
server/models/coffee.model.js - The specs are in
test/coffee.model.test.js
- This will go in
-
There will be a
Pugmodel, representing apugsdatabase table (containing all my pug friends!)- This will go in
server/models/pug.model.js, and you can set associations inmodels/index.js - The specs are in
test/pug.model.test.js
- This will go in
-
We'll serve up the coffee resource via
/api/coffee!- This will go in
server/routes/coffee.router.js - The specs are in
test/coffee.routes.test.js
- This will go in
-
We'll serve up the pugs resource via
/api/pugs!- This will go in
server/routes/pug.router.js - The specs are in
test/pug.routes.test.js
- This will go in
-
Finally, we'll need some utility functions to do some work for us around the cafe. Funky functions!
- These will go in
server/funky-funcs/index.js - The specs are in
test/funky-funcs.test.js
- These will go in
You should only need to work out of those files listed above! The Pug model is somewhat dependent on the Coffee model, and the /api/pugs routes are somewhat dependent on the Pug model. So I recommend working on them in the order listed above. The funky funcs can be done independently of the routes/models though! That's why they're so funky!
