Cheatsheet: Heroku Deployment

Posted by & filed under CheatSheets, Web Development.

Some deployment steps for Heroku: To deploy static html/css project: 1) Create an index.php file with the following content: <?php include_once(“home.html”); ?> 2) Rename your main or index.html to home.html 3) Deploy app To deploy node.js project: 1) Ensure package.json has a start script and deploy app. e.g. “scripts”: { “test”: “echo \”Error: no test… Read more »

Cheatsheet: MongoDB

Posted by & filed under CheatSheets, Concepts, Web Development.

Mongo DB Commands A table of some useful mongo commands. These were used and tested on Cloud 9. Command Description $ mkdir data $ echo ‘mongod –bind_ip=$IP –dbpath=data –nojournal –rest “$@”‘ > mongod $ chmod a+x mongod Setup Mongo to use a dir “data” ./mongod Start mongo server mongo Start mongo shell show dbs Print… Read more »

Cheatsheet: GIT

Posted by & filed under CheatSheets, Concepts, Web Development.

GIT Commands A table of some useful git commands. Command Description git init Create a new local repository git rm -rf .git Undo git init git add <filename> git add . Add one or more files to staging (index) git status List the files you’ve changed and those you still need to add or commit… Read more »

Cheatsheet: REST

Posted by & filed under CheatSheets, Concepts, Web Development.

RESTful Routes A table of all 7 RESTful routes Name Path HTTP Verb Purpose Mongoose Method Index /dogs GET List all dogs Dog.find() New /dogs/new GET Show new dog form N/A Create /dogs POST Create a new dog, then redirect somewhere Dog.create() Show /dogs/:id GET Show info about one specific dog Dog.findById() Edit /dogs/:id/edit GET… Read more »