Found 38 repositories(showing 30)
leshill
Use handlebars.js templates with the Rails asset pipeline.
thewebdeveloper2017
<!DOCTYPE html> <html dir="ltr" lang="en" xml:lang="en"> <head> <!-- front --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>iLearn: Log in to the site</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(e,t,n){function r(n){if(!t[n]){var o=t[n]={exports:{}};e[n][0].call(o.exports,function(t){var o=e[n][1][t];return r(o||t)},o,o.exports)}return t[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<n.length;o++)r(n[o]);return r}({1:[function(e,t,n){function r(){}function o(e,t,n){return function(){return i(e,[(new Date).getTime()].concat(u(arguments)),t?null:this,n),t?void 0:this}}var i=e("handle"),a=e(2),u=e(3),c=e("ee").get("tracer"),f=NREUM;"undefined"==typeof window.newrelic&&(newrelic=f);var s=["setPageViewName","setCustomAttribute","setErrorHandler","finished","addToTrace","inlineHit","addRelease"],l="api-",p=l+"ixn-";a(s,function(e,t){f[t]=o(l+t,!0,"api")}),f.addPageAction=o(l+"addPageAction",!0),f.setCurrentRouteName=o(l+"routeName",!0),t.exports=newrelic,f.interaction=function(){return(new r).get()};var d=r.prototype={createTracer:function(e,t){var n={},r=this,o="function"==typeof t;return i(p+"tracer",[Date.now(),e,n],r),function(){if(c.emit((o?"":"no-")+"fn-start",[Date.now(),r,o],n),o)try{return t.apply(this,arguments)}finally{c.emit("fn-end",[Date.now()],n)}}}};a("setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),function(e,t){d[t]=o(p+t)}),newrelic.noticeError=function(e){"string"==typeof e&&(e=new Error(e)),i("err",[e,(new Date).getTime()])}},{}],2:[function(e,t,n){function r(e,t){var n=[],r="",i=0;for(r in e)o.call(e,r)&&(n[i]=t(r,e[r]),i+=1);return n}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],3:[function(e,t,n){function r(e,t,n){t||(t=0),"undefined"==typeof n&&(n=e?e.length:0);for(var r=-1,o=n-t||0,i=Array(o<0?0:o);++r<o;)i[r]=e[t+r];return i}t.exports=r},{}],ee:[function(e,t,n){function r(){}function o(e){function t(e){return e&&e instanceof r?e:e?c(e,u,i):i()}function n(n,r,o){if(!p.aborted){e&&e(n,r,o);for(var i=t(o),a=v(n),u=a.length,c=0;c<u;c++)a[c].apply(i,r);var f=s[w[n]];return f&&f.push([y,n,r,i]),i}}function d(e,t){b[e]=v(e).concat(t)}function v(e){return b[e]||[]}function g(e){return l[e]=l[e]||o(n)}function m(e,t){f(e,function(e,n){t=t||"feature",w[n]=t,t in s||(s[t]=[])})}var b={},w={},y={on:d,emit:n,get:g,listeners:v,context:t,buffer:m,abort:a,aborted:!1};return y}function i(){return new r}function a(){(s.api||s.feature)&&(p.aborted=!0,s=p.backlog={})}var u="nr@context",c=e("gos"),f=e(2),s={},l={},p=t.exports=o();p.backlog=s},{}],gos:[function(e,t,n){function r(e,t,n){if(o.call(e,t))return e[t];var r=n();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!1}),r}catch(i){}return e[t]=r,r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],handle:[function(e,t,n){function r(e,t,n,r){o.buffer([e],r),o.emit(e,t,n)}var o=e("ee").get("handle");t.exports=r,r.ee=o},{}],id:[function(e,t,n){function r(e){var t=typeof e;return!e||"object"!==t&&"function"!==t?-1:e===window?0:a(e,i,function(){return o++})}var o=1,i="nr@id",a=e("gos");t.exports=r},{}],loader:[function(e,t,n){function r(){if(!h++){var e=y.info=NREUM.info,t=l.getElementsByTagName("script")[0];if(setTimeout(f.abort,3e4),!(e&&e.licenseKey&&e.applicationID&&t))return f.abort();c(b,function(t,n){e[t]||(e[t]=n)}),u("mark",["onload",a()],null,"api");var n=l.createElement("script");n.src="https://"+e.agent,t.parentNode.insertBefore(n,t)}}function o(){"complete"===l.readyState&&i()}function i(){u("mark",["domContent",a()],null,"api")}function a(){return(new Date).getTime()}var u=e("handle"),c=e(2),f=e("ee"),s=window,l=s.document,p="addEventListener",d="attachEvent",v=s.XMLHttpRequest,g=v&&v.prototype;NREUM.o={ST:setTimeout,CT:clearTimeout,XHR:v,REQ:s.Request,EV:s.Event,PR:s.Promise,MO:s.MutationObserver},e(1);var m=""+location,b={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-1016.min.js"},w=v&&g&&g[p]&&!/CriOS/.test(navigator.userAgent),y=t.exports={offset:a(),origin:m,features:{},xhrWrappable:w};l[p]?(l[p]("DOMContentLoaded",i,!1),s[p]("load",r,!1)):(l[d]("onreadystatechange",o),s[d]("onload",r)),u("mark",["firstbyte",a()],null,"api");var h=0},{}]},{},["loader"]);</script> <meta name="keywords" content="moodle, iLearn: Log in to the site" /> <link rel="stylesheet" type="text/css" href="https://ilearn.mq.edu.au/theme/yui_combo.php?r1487942275&rollup/3.17.2/yui-moodlesimple-min.css" /><script id="firstthemesheet" type="text/css">/** Required in order to fix style inclusion problems in IE with YUI **/</script><link rel="stylesheet" type="text/css" href="https://ilearn.mq.edu.au/theme/styles.php/mqu/1487942275/all" /> <script type="text/javascript"> //<![CDATA[ var M = {}; M.yui = {}; M.pageloadstarttime = new Date(); M.cfg = {"wwwroot":"https:\/\/ilearn.mq.edu.au","sesskey":"mDL5SddUvA","loadingicon":"https:\/\/ilearn.mq.edu.au\/theme\/image.php\/mqu\/core\/1487942275\/i\/loading_small","themerev":"1487942275","slasharguments":1,"theme":"mqu","jsrev":"1487942275","admin":"admin","svgicons":true};var yui1ConfigFn = function(me) {if(/-skin|reset|fonts|grids|base/.test(me.name)){me.type='css';me.path=me.path.replace(/\.js/,'.css');me.path=me.path.replace(/\/yui2-skin/,'/assets/skins/sam/yui2-skin')}}; var yui2ConfigFn = function(me) {var parts=me.name.replace(/^moodle-/,'').split('-'),component=parts.shift(),module=parts[0],min='-min';if(/-(skin|core)$/.test(me.name)){parts.pop();me.type='css';min=''};if(module){var filename=parts.join('-');me.path=component+'/'+module+'/'+filename+min+'.'+me.type}else me.path=component+'/'+component+'.'+me.type}; YUI_config = {"debug":false,"base":"https:\/\/ilearn.mq.edu.au\/lib\/yuilib\/3.17.2\/","comboBase":"https:\/\/ilearn.mq.edu.au\/theme\/yui_combo.php?r1487942275&","combine":true,"filter":null,"insertBefore":"firstthemesheet","groups":{"yui2":{"base":"https:\/\/ilearn.mq.edu.au\/lib\/yuilib\/2in3\/2.9.0\/build\/","comboBase":"https:\/\/ilearn.mq.edu.au\/theme\/yui_combo.php?r1487942275&","combine":true,"ext":false,"root":"2in3\/2.9.0\/build\/","patterns":{"yui2-":{"group":"yui2","configFn":yui1ConfigFn}}},"moodle":{"name":"moodle","base":"https:\/\/ilearn.mq.edu.au\/theme\/yui_combo.php?m\/1487942275\/","combine":true,"comboBase":"https:\/\/ilearn.mq.edu.au\/theme\/yui_combo.php?r1487942275&","ext":false,"root":"m\/1487942275\/","patterns":{"moodle-":{"group":"moodle","configFn":yui2ConfigFn}},"filter":null,"modules":{"moodle-core-actionmenu":{"requires":["base","event","node-event-simulate"]},"moodle-core-blocks":{"requires":["base","node","io","dom","dd","dd-scroll","moodle-core-dragdrop","moodle-core-notification"]},"moodle-core-checknet":{"requires":["base-base","moodle-core-notification-alert","io-base"]},"moodle-core-chooserdialogue":{"requires":["base","panel","moodle-core-notification"]},"moodle-core-dock":{"requires":["base","node","event-custom","event-mouseenter","event-resize","escape","moodle-core-dock-loader","moodle-core-event"]},"moodle-core-dock-loader":{"requires":["escape"]},"moodle-core-dragdrop":{"requires":["base","node","io","dom","dd","event-key","event-focus","moodle-core-notification"]},"moodle-core-event":{"requires":["event-custom"]},"moodle-core-formautosubmit":{"requires":["base","event-key"]},"moodle-core-formchangechecker":{"requires":["base","event-focus","moodle-core-event"]},"moodle-core-handlebars":{"condition":{"trigger":"handlebars","when":"after"}},"moodle-core-languninstallconfirm":{"requires":["base","node","moodle-core-notification-confirm","moodle-core-notification-alert"]},"moodle-core-lockscroll":{"requires":["plugin","base-build"]},"moodle-core-maintenancemodetimer":{"requires":["base","node"]},"moodle-core-notification":{"requires":["moodle-core-notification-dialogue","moodle-core-notification-alert","moodle-core-notification-confirm","moodle-core-notification-exception","moodle-core-notification-ajaxexception"]},"moodle-core-notification-dialogue":{"requires":["base","node","panel","escape","event-key","dd-plugin","moodle-core-widget-focusafterclose","moodle-core-lockscroll"]},"moodle-core-notification-alert":{"requires":["moodle-core-notification-dialogue"]},"moodle-core-notification-confirm":{"requires":["moodle-core-notification-dialogue"]},"moodle-core-notification-exception":{"requires":["moodle-core-notification-dialogue"]},"moodle-core-notification-ajaxexception":{"requires":["moodle-core-notification-dialogue"]},"moodle-core-popuphelp":{"requires":["moodle-core-tooltip"]},"moodle-core-session-extend":{"requires":["base","node","io-base","panel","dd-plugin"]},"moodle-core-tooltip":{"requires":["base","node","io-base","moodle-core-notification-dialogue","json-parse","widget-position","widget-position-align","event-outside","cache-base"]},"moodle-core_availability-form":{"requires":["base","node","event","panel","moodle-core-notification-dialogue","json"]},"moodle-backup-backupselectall":{"requires":["node","event","node-event-simulate","anim"]},"moodle-backup-confirmcancel":{"requires":["node","node-event-simulate","moodle-core-notification-confirm"]},"moodle-calendar-info":{"requires":["base","node","event-mouseenter","event-key","overlay","moodle-calendar-info-skin"]},"moodle-course-categoryexpander":{"requires":["node","event-key"]},"moodle-course-dragdrop":{"requires":["base","node","io","dom","dd","dd-scroll","moodle-core-dragdrop","moodle-core-notification","moodle-course-coursebase","moodle-course-util"]},"moodle-course-formatchooser":{"requires":["base","node","node-event-simulate"]},"moodle-course-management":{"requires":["base","node","io-base","moodle-core-notification-exception","json-parse","dd-constrain","dd-proxy","dd-drop","dd-delegate","node-event-delegate"]},"moodle-course-modchooser":{"requires":["moodle-core-chooserdialogue","moodle-course-coursebase"]},"moodle-course-toolboxes":{"requires":["node","base","event-key","node","io","moodle-course-coursebase","moodle-course-util"]},"moodle-course-util":{"requires":["node"],"use":["moodle-course-util-base"],"submodules":{"moodle-course-util-base":{},"moodle-course-util-section":{"requires":["node","moodle-course-util-base"]},"moodle-course-util-cm":{"requires":["node","moodle-course-util-base"]}}},"moodle-form-dateselector":{"requires":["base","node","overlay","calendar"]},"moodle-form-passwordunmask":{"requires":["node","base"]},"moodle-form-shortforms":{"requires":["node","base","selector-css3","moodle-core-event"]},"moodle-form-showadvanced":{"requires":["node","base","selector-css3"]},"moodle-core_message-messenger":{"requires":["escape","handlebars","io-base","moodle-core-notification-ajaxexception","moodle-core-notification-alert","moodle-core-notification-dialogue","moodle-core-notification-exception"]},"moodle-core_message-deletemessage":{"requires":["node","event"]},"moodle-question-chooser":{"requires":["moodle-core-chooserdialogue"]},"moodle-question-preview":{"requires":["base","dom","event-delegate","event-key","core_question_engine"]},"moodle-question-qbankmanager":{"requires":["node","selector-css3"]},"moodle-question-searchform":{"requires":["base","node"]},"moodle-availability_completion-form":{"requires":["base","node","event","moodle-core_availability-form"]},"moodle-availability_date-form":{"requires":["base","node","event","io","moodle-core_availability-form"]},"moodle-availability_grade-form":{"requires":["base","node","event","moodle-core_availability-form"]},"moodle-availability_group-form":{"requires":["base","node","event","moodle-core_availability-form"]},"moodle-availability_grouping-form":{"requires":["base","node","event","moodle-core_availability-form"]},"moodle-availability_profile-form":{"requires":["base","node","event","moodle-core_availability-form"]},"moodle-qtype_ddimageortext-dd":{"requires":["node","dd","dd-drop","dd-constrain"]},"moodle-qtype_ddimageortext-form":{"requires":["moodle-qtype_ddimageortext-dd","form_filepicker"]},"moodle-qtype_ddmarker-dd":{"requires":["node","event-resize","dd","dd-drop","dd-constrain","graphics"]},"moodle-qtype_ddmarker-form":{"requires":["moodle-qtype_ddmarker-dd","form_filepicker","graphics","escape"]},"moodle-qtype_ddwtos-dd":{"requires":["node","dd","dd-drop","dd-constrain"]},"moodle-mod_assign-history":{"requires":["node","transition"]},"moodle-mod_attendance-groupfilter":{"requires":["base","node"]},"moodle-mod_dialogue-autocomplete":{"requires":["base","node","json-parse","autocomplete","autocomplete-filters","autocomplete-highlighters","event","event-key"]},"moodle-mod_dialogue-clickredirector":{"requires":["base","node","json-parse","clickredirector","clickredirector-filters","clickredirector-highlighters","event","event-key"]},"moodle-mod_dialogue-userpreference":{"requires":["base","node","json-parse","userpreference","userpreference-filters","userpreference-highlighters","event","event-key"]},"moodle-mod_forum-subscriptiontoggle":{"requires":["base-base","io-base"]},"moodle-mod_oublog-savecheck":{"requires":["base","node","io","panel","moodle-core-notification-alert"]},"moodle-mod_oublog-tagselector":{"requires":["base","node","autocomplete","autocomplete-filters","autocomplete-highlighters"]},"moodle-mod_quiz-autosave":{"requires":["base","node","event","event-valuechange","node-event-delegate","io-form"]},"moodle-mod_quiz-dragdrop":{"requires":["base","node","io","dom","dd","dd-scroll","moodle-core-dragdrop","moodle-core-notification","moodle-mod_quiz-quizbase","moodle-mod_quiz-util-base","moodle-mod_quiz-util-page","moodle-mod_quiz-util-slot","moodle-course-util"]},"moodle-mod_quiz-modform":{"requires":["base","node","event"]},"moodle-mod_quiz-questionchooser":{"requires":["moodle-core-chooserdialogue","moodle-mod_quiz-util","querystring-parse"]},"moodle-mod_quiz-quizbase":{"requires":["base","node"]},"moodle-mod_quiz-quizquestionbank":{"requires":["base","event","node","io","io-form","yui-later","moodle-question-qbankmanager","moodle-core-notification-dialogue"]},"moodle-mod_quiz-randomquestion":{"requires":["base","event","node","io","moodle-core-notification-dialogue"]},"moodle-mod_quiz-repaginate":{"requires":["base","event","node","io","moodle-core-notification-dialogue"]},"moodle-mod_quiz-toolboxes":{"requires":["base","node","event","event-key","io","moodle-mod_quiz-quizbase","moodle-mod_quiz-util-slot","moodle-core-notification-ajaxexception"]},"moodle-mod_quiz-util":{"requires":["node"],"use":["moodle-mod_quiz-util-base"],"submodules":{"moodle-mod_quiz-util-base":{},"moodle-mod_quiz-util-slot":{"requires":["node","moodle-mod_quiz-util-base"]},"moodle-mod_quiz-util-page":{"requires":["node","moodle-mod_quiz-util-base"]}}},"moodle-message_airnotifier-toolboxes":{"requires":["base","node","io"]},"moodle-filter_glossary-autolinker":{"requires":["base","node","io-base","json-parse","event-delegate","overlay","moodle-core-event","moodle-core-notification-alert","moodle-core-notification-exception","moodle-core-notification-ajaxexception"]},"moodle-filter_mathjaxloader-loader":{"requires":["moodle-core-event"]},"moodle-editor_atto-editor":{"requires":["node","transition","io","overlay","escape","event","event-simulate","event-custom","node-event-html5","node-event-simulate","yui-throttle","moodle-core-notification-dialogue","moodle-core-notification-confirm","moodle-editor_atto-rangy","handlebars","timers","querystring-stringify"]},"moodle-editor_atto-plugin":{"requires":["node","base","escape","event","event-outside","handlebars","event-custom","timers","moodle-editor_atto-menu"]},"moodle-editor_atto-menu":{"requires":["moodle-core-notification-dialogue","node","event","event-custom"]},"moodle-editor_atto-rangy":{"requires":[]},"moodle-report_eventlist-eventfilter":{"requires":["base","event","node","node-event-delegate","datatable","autocomplete","autocomplete-filters"]},"moodle-report_loglive-fetchlogs":{"requires":["base","event","node","io","node-event-delegate"]},"moodle-gradereport_grader-gradereporttable":{"requires":["base","node","event","handlebars","overlay","event-hover"]},"moodle-gradereport_history-userselector":{"requires":["escape","event-delegate","event-key","handlebars","io-base","json-parse","moodle-core-notification-dialogue"]},"moodle-tool_capability-search":{"requires":["base","node"]},"moodle-tool_lp-dragdrop-reorder":{"requires":["moodle-core-dragdrop"]},"moodle-assignfeedback_editpdf-editor":{"requires":["base","event","node","io","graphics","json","event-move","event-resize","transition","querystring-stringify-simple","moodle-core-notification-dialog","moodle-core-notification-exception","moodle-core-notification-ajaxexception"]},"moodle-atto_accessibilitychecker-button":{"requires":["color-base","moodle-editor_atto-plugin"]},"moodle-atto_accessibilityhelper-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_align-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_bold-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_charmap-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_chemistry-button":{"requires":["moodle-editor_atto-plugin","moodle-core-event","io","event-valuechange","tabview","array-extras"]},"moodle-atto_clear-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_collapse-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_emoticon-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_equation-button":{"requires":["moodle-editor_atto-plugin","moodle-core-event","io","event-valuechange","tabview","array-extras"]},"moodle-atto_html-button":{"requires":["moodle-editor_atto-plugin","event-valuechange"]},"moodle-atto_image-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_indent-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_italic-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_link-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_managefiles-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_managefiles-usedfiles":{"requires":["node","escape"]},"moodle-atto_media-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_noautolink-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_orderedlist-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_rtl-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_strike-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_subscript-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_superscript-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_table-button":{"requires":["moodle-editor_atto-plugin","moodle-editor_atto-menu","event","event-valuechange"]},"moodle-atto_title-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_underline-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_undo-button":{"requires":["moodle-editor_atto-plugin"]},"moodle-atto_unorderedlist-button":{"requires":["moodle-editor_atto-plugin"]}}},"gallery":{"name":"gallery","base":"https:\/\/ilearn.mq.edu.au\/lib\/yuilib\/gallery\/","combine":true,"comboBase":"https:\/\/ilearn.mq.edu.au\/theme\/yui_combo.php?","ext":false,"root":"gallery\/1487942275\/","patterns":{"gallery-":{"group":"gallery"}}}},"modules":{"core_filepicker":{"name":"core_filepicker","fullpath":"https:\/\/ilearn.mq.edu.au\/lib\/javascript.php\/1487942275\/repository\/filepicker.js","requires":["base","node","node-event-simulate","json","async-queue","io-base","io-upload-iframe","io-form","yui2-treeview","panel","cookie","datatable","datatable-sort","resize-plugin","dd-plugin","escape","moodle-core_filepicker"]},"core_comment":{"name":"core_comment","fullpath":"https:\/\/ilearn.mq.edu.au\/lib\/javascript.php\/1487942275\/comment\/comment.js","requires":["base","io-base","node","json","yui2-animation","overlay"]}}}; M.yui.loader = {modules: {}}; //]]> </script> <meta name="robots" content="noindex" /> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> <link rel="apple-touch-icon-precomposed" href="https://ilearn.mq.edu.au/theme/image.php/mqu/theme/1487942275/apple-touch-icon-144-precomposed" sizes="144x144"> <link rel="shortcut icon" href="https://ilearn.mq.edu.au/theme/image.php/mqu/theme/1487942275/favicon"> </head> <body id="page-login-index" class="format-site path-login gecko dir-ltr lang-en yui-skin-sam yui3-skin-sam ilearn-mq-edu-au pagelayout-login course-1 context-1 notloggedin content-only layout-option-noblocks layout-option-nocourseheaderfooter layout-option-nocustommenu layout-option-nofooter layout-option-nonavbar"> <div class="skiplinks"><a class="skip" href="#maincontent">Skip to main content</a></div> <script type="text/javascript" src="https://ilearn.mq.edu.au/theme/yui_combo.php?r1487942275&rollup/3.17.2/yui-moodlesimple-min.js&rollup/1487942275/mcore-min.js"></script><script type="text/javascript" src="https://ilearn.mq.edu.au/theme/jquery.php/r1487942275/core/jquery-1.12.1.min.js"></script> <script type="text/javascript" src="https://ilearn.mq.edu.au/lib/javascript.php/1487942275/lib/javascript-static.js"></script> <script type="text/javascript"> //<![CDATA[ document.body.className += ' jsenabled'; //]]> </script> <div id="nice_debug_area"></div> <header id="page-header"> <div class="container"> <div class="login-logos"> <div class="mq-logo"> <a class="login-logo" href="http://ilearn.mq.edu.au"><img alt="Macquarie University" src="https://ilearn.mq.edu.au/theme/image.php/mqu/theme/1487942275/login-logo"></a> </div><!-- /.mq-logo --> <div class="ilearn-logo"> <a class="login-logo-ilearn" href="http://ilearn.mq.edu.au"><img alt="iLearn" src="https://ilearn.mq.edu.au/theme/image.php/mqu/theme/1487942275/ilearn-logo"></a> </div><!-- /.ilearn-logo --> </div><!-- /.login-logos --> </div><!-- /.container --> </header><!-- #page-header --> <div id="page"> <div class="container" id="page-content"> <div class="login-wing login-wing-left"></div> <div class="login-wing login-wing-right"></div> <h1 class="login-h1">iLearn Login</h1> <span class="notifications" id="user-notifications"></span><div role="main"><span id="maincontent"></span><div class="loginbox clearfix twocolumns"> <div class="loginpanel"> <h2>Log in</h2> <div class="subcontent loginsub"> <form action="https://ilearn.mq.edu.au/login/index.php" method="post" id="login" > <div class="loginform"> <div class="form-label"><label for="username">Username</label></div> <div class="form-input"> <input type="text" name="username" id="username" size="15" tabindex="1" value="" /> </div> <div class="clearer"><!-- --></div> <div class="form-label"><label for="password">Password</label></div> <div class="form-input"> <input type="password" name="password" id="password" size="15" tabindex="2" value="" /> </div> </div> <div class="clearer"><!-- --></div> <div class="clearer"><!-- --></div> <input id="anchor" type="hidden" name="anchor" value="" /> <script>document.getElementById('anchor').value = location.hash</script> <input type="submit" id="loginbtn" value="Log in" /> <div class="forgetpass"><a href="forgot_password.php">Forgotten your username or password?</a></div> </form> <script type="text/javascript"> $(document).ready(function(){ var input = document.getElementById ("username"); input.focus(); }); </script> <div class="desc"> Cookies must be enabled in your browser<span class="helptooltip"><a href="https://ilearn.mq.edu.au/help.php?component=moodle&identifier=cookiesenabled&lang=en" title="Help with Cookies must be enabled in your browser" aria-haspopup="true" target="_blank"><img src="https://ilearn.mq.edu.au/theme/image.php/mqu/core/1487942275/help" alt="Help with Cookies must be enabled in your browser" class="iconhelp" /></a></span> </div> </div> </div> <div class="signuppanel"> <h2>Is this your first time here?</h2> <div class="subcontent"> </div> </div> <script> dataLayer = []; </script> <!-- Google Tag Manager --> <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-MQZTHB" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-MQZTHB');</script> <!-- End Google Tag Manager --> </div> </div><!-- /.container #page-content --> </div><!-- /#page --> <footer id="page-footer"> <div class="container"> <ul class="page-footer-ul"> <li><a href="http://help.ilearn.mq.edu.au/" target="_blank">iLearn Help and FAQ</a></li> <li><a href="https://oneid.mq.edu.au/" target="_blank">Forgotten your password?</a></li> <li><a href="http://status.ilearn.mq.edu.au/" target="_blank">iLearn Status</a></li> </ul><!-- /.page-footer-ul --> <div class="login-footer-info"> <p>If you are having trouble accessing your online unit due to a disability or health condition, please go to the <a href="http://www.students.mq.edu.au/support/accessibility_services" target="_blank">Student Services Website</a> for information on how to get assistance</p> <p>All material available on iLearn belongs to Macquarie University or has been copied and communicated to Macquarie staff and students under statutory licences and educational exceptions under Australian copyright law. This material is provided for the educational purposes of Macquarie students and staff. It is illegal to copy and distribute this material beyond iLearn except in very limited circumstances and as provided by specific copyright exceptions.</p> </div><!-- /.login-footer-info --> <div class="login-footer-link"> <div class="bootstrap-row"> <div class="col-md-7"> <p>© Copyright Macquarie University | <a href="http://www.mq.edu.au/privacy/privacy.html" target="_blank">Privacy</a> | <a href="http://www.mq.edu.au/accessibility.html" target="_blank">Accessibility Information</a></p> </div><!-- /.col-md-7 --> <div class="col-md-5"> <p>ABN 90 952 801 237 | CRICOS Provider 00002J</p> </div><!-- /.col-md-5 --> </div><!-- /.bootstrap-row --> </div><!-- /.login-footer-link --> </div><!-- /.container --> </footer><!-- /#page-footer --> <script type="text/javascript"> //<![CDATA[ var require = { baseUrl : 'https://ilearn.mq.edu.au/lib/requirejs.php/1487942275/', // We only support AMD modules with an explicit define() statement. enforceDefine: true, skipDataMain: true, waitSeconds : 0, paths: { jquery: 'https://ilearn.mq.edu.au/lib/javascript.php/1487942275/lib/jquery/jquery-1.12.1.min', jqueryui: 'https://ilearn.mq.edu.au/lib/javascript.php/1487942275/lib/jquery/ui-1.11.4/jquery-ui.min', jqueryprivate: 'https://ilearn.mq.edu.au/lib/javascript.php/1487942275/lib/requirejs/jquery-private' }, // Custom jquery config map. map: { // '*' means all modules will get 'jqueryprivate' // for their 'jquery' dependency. '*': { jquery: 'jqueryprivate' }, // 'jquery-private' wants the real jQuery module // though. If this line was not here, there would // be an unresolvable cyclic dependency. jqueryprivate: { jquery: 'jquery' } } }; //]]> </script> <script type="text/javascript" src="https://ilearn.mq.edu.au/lib/javascript.php/1487942275/lib/requirejs/require.min.js"></script> <script type="text/javascript"> //<![CDATA[ require(['core/first'], function() { ; require(["core/notification"], function(amd) { amd.init(1, [], false); });; require(["core/log"], function(amd) { amd.setConfig({"level":"warn"}); }); }); //]]> </script> <script type="text/javascript"> //<![CDATA[ M.yui.add_module({"mathjax":{"name":"mathjax","fullpath":"https:\/\/cdn.mathjax.org\/mathjax\/2.6-latest\/MathJax.js?delayStartupUntil=configured"}}); //]]> </script> <script type="text/javascript" src="https://ilearn.mq.edu.au/theme/javascript.php/mqu/1487942275/footer"></script> <script type="text/javascript"> //<![CDATA[ M.str = {"moodle":{"lastmodified":"Last modified","name":"Name","error":"Error","info":"Information","namedfiletoolarge":"The file '{$a->filename}' is too large and cannot be uploaded","yes":"Yes","no":"No","morehelp":"More help","loadinghelp":"Loading...","cancel":"Cancel","ok":"OK","confirm":"Confirm","areyousure":"Are you sure?","closebuttontitle":"Close","unknownerror":"Unknown error"},"repository":{"type":"Type","size":"Size","invalidjson":"Invalid JSON string","nofilesattached":"No files attached","filepicker":"File picker","logout":"Logout","nofilesavailable":"No files available","norepositoriesavailable":"Sorry, none of your current repositories can return files in the required format.","fileexistsdialogheader":"File exists","fileexistsdialog_editor":"A file with that name has already been attached to the text you are editing.","fileexistsdialog_filemanager":"A file with that name has already been attached","renameto":"Rename to \"{$a}\"","referencesexist":"There are {$a} alias\/shortcut files that use this file as their source","select":"Select"},"admin":{"confirmdeletecomments":"You are about to delete comments, are you sure?","confirmation":"Confirmation"},"block":{"addtodock":"Move this to the dock","undockitem":"Undock this item","dockblock":"Dock {$a} block","undockblock":"Undock {$a} block","undockall":"Undock all","hidedockpanel":"Hide the dock panel","hidepanel":"Hide panel"},"langconfig":{"thisdirectionvertical":"btt"}}; //]]> </script> <script type="text/javascript"> //<![CDATA[ (function() {M.util.load_flowplayer(); setTimeout("fix_column_widths()", 20); Y.use("moodle-core-dock-loader",function() {M.core.dock.loader.initLoader(); }); M.util.help_popups.setup(Y); Y.use("moodle-core-popuphelp",function() {M.core.init_popuphelp(); }); M.util.js_pending('random58b8dd8d3abcf2'); Y.on('domready', function() { M.util.move_debug_messages(Y); M.util.js_complete('random58b8dd8d3abcf2'); }); M.util.js_pending('random58b8dd8d3abcf3'); Y.on('domready', function() { M.util.netspot_perf_info(Y, "00000000:0423_00000000:0050_58B8DD8D_30F8F6D:3B0C", 1488510349.1968); M.util.js_complete('random58b8dd8d3abcf3'); }); M.util.init_skiplink(Y); Y.use("moodle-filter_glossary-autolinker",function() {M.filter_glossary.init_filter_autolinking({"courseid":0}); }); Y.use("moodle-filter_mathjaxloader-loader",function() {M.filter_mathjaxloader.configure({"mathjaxconfig":"\nMathJax.Hub.Config({\n config: [\"Accessible.js\", \"Safe.js\"],\n errorSettings: { message: [\"!\"] },\n skipStartupTypeset: true,\n messageStyle: \"none\",\n TeX: {\n extensions: [\"mhchem.js\",\"color.js\",\"AMSmath.js\",\"AMSsymbols.js\",\"noErrors.js\",\"noUndefined.js\"]\n }\n});\n ","lang":"en"}); }); M.util.js_pending('random58b8dd8d3abcf5'); Y.on('domready', function() { M.util.js_complete("init"); M.util.js_complete('random58b8dd8d3abcf5'); }); })(); //]]> </script> <script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","licenseKey":"d6bb71fb66","applicationID":"3373525,3377726","transactionName":"YVMHYkVQWkIAUERQDFgZMEReHlheBlpeFgpYUgBOGUFcQQ==","queueTime":0,"applicationTime":48,"atts":"TRQEFA1KSUw=","errorBeacon":"bam.nr-data.net","agent":""}</script></body> </html>
nicolai86
add hbs_form_for helper with automatic attribute binding to asset pipeline
leshill
Example app showing how to use handlebars_assets
cpadsala
QmeIn - A Virtual 'Q' for All Description: QmeIn web application is designed for users to free themselves from the constraints of a physical line. QmeIn is a virtual queue that no longer requires the user to be present at a real queue at all times. With the tap of a button, a user places themselves in a virtual queue which proceeds as a real queue. Whether the queue is at the DMV, a bank, a restaurant, a stadium ticket counter, a parking lot, our own Titan bookstore, or the countless other locations that require people to stand in line, QmeIn will seamlessly do the waiting for the user. Process: QmeIn provides the user with a list of merchants who have queues currently open. The user can select a specific merchant and queue themselves in with a simple tap of the 'QmeIn' button. Once the user queues in, they are entered into a virtual queue and notified of their position, as well as an estimated time to the point of transaction. The user will, thus, be free from having to be present and waiting in a physical line allowing them to multi-task, or simply relax. As the queue proceeds, the user will be notified through an SMS when they are third from the point of transaction, thus giving them ample time to proceed to the physical line to complete their transaction. When a merchant logs in to QmeIn, they are provided with a list of users currently in queue and the time elapsed on the current transaction. Once the merchant has completed the transaction with the current user, they will tap the 'Complete' button and remove that user from the queue. The queue then proceeds forward with the next user. Highlights: Before even entering a virtual queue, QmeIn provides information to the user on how many people are in the current queue for a merchant, as well as, their average time of transaction. This information can guide users to prudently allocate their time. Users are not bound to a queue, just as a physical line, they can walk away from their position in line. In QmeIn, the user has the option to simply tap 'QmeOut' and walk away from the queue in a single step. Future: QmeIn will provide not only an effortless means to get in a queue for the user, but it will also provide critical data to merchants. As the number of queues and users within them increase, merchants will be able to obtain more accurate times of transaction for each user. The merchant will also become aware of time periods which occupy the highest number of transactions and the lowest. Furthermore, as 'QmeOut' data aggregates, the merchant will know when the highest number of users are lost to wait times. All this real-time data provided from QmeIn will guide merchants to more efficiently manage their labor and other assets. Conclusion: As software etches itself as a required element of our daily livelihood, QmeIn continues this momentum with an abstraction of reality. QmeIn manipulates the physical sense in a virtual environment to give physical freedom to its user. The web app removes constraints allowing users to allocate their physical being at their discretion and benefit. Technologies Used: Node.js, Express Framework, JavaScript, MongoDB, Mongoose, Handlebars, HTML 5, CSS 3
8ctopotamus
A MySQL/Sequelize/Express/Handlebars monster builder using assets from Kenney.nl.
aesisify
A simple setup using Gulp and Handlebars (with layout support) to compile HTML, copy assets, and run a live server.
CaptainEFFF
# Node Express Handlebars ### Overview In this assignment, you'll create a burger logger with MySQL, Node, Express, Handlebars and a homemade ORM (yum!). Be sure to follow the MVC design pattern; use Node and MySQL to query and route data in your app, and Handlebars to generate your HTML. ### Read This When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. ### Important * **This assignment must be deployed.** Be sure to utilize the [MYSQL Heroku Deployment Guide](../../03-Supplemental/MySQLHerokuDeploymentProcess.pdf) in order to deploy your assignment. ### Before You Begin * Eat-Da-Burger! is a restaurant app that lets users input the names of burgers they'd like to eat. * Whenever a user submits a burger's name, your app will display the burger on the left side of the page -- waiting to be devoured. * Each burger in the waiting area also has a `Devour it!` button. When the user clicks it, the burger will move to the right side of the page. * Your app will store every burger in a database, whether devoured or not. * [Check out this video of the app for a run-through of how it works](https://youtu.be/msvdn95x9OM). ### Commits Having an active and healthy commit history on GitHub is important for your future job search. It is also extremely important for making sure your work is saved in your repository. If something breaks, committing often ensures you are able to go back to a working version of your code. * Committing often is a signal to employers that you are actively working on your code and learning. * We use the mantra “commit early and often.” This means that when you write code that works, add it and commit it! * Numerous commits allow you to see how your app is progressing and give you a point to revert to if anything goes wrong. * Be clear and descriptive in your commit messaging. * When writing a commit message, avoid vague messages like "fixed." Be descriptive so that you and anyone else looking at your repository knows what happened with each commit. * We would like you to have well over 200 commits by graduation, so commit early and often! ### Submission on BCS * **This assignment must be deployed.** * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! ## Instructions #### App Setup 1. Create a GitHub repo called `burger` and clone it to your computer. 2. Make a package.json file by running `npm init` from the command line. 3. Install the Express npm package: `npm install express`. 4. Create a server.js file. 5. Install the Handlebars npm package: `npm install express-handlebars`. 6. Install MySQL npm package: `npm install mysql`. 7. Require the following npm packages inside of the server.js file: * express #### DB Setup 1. Inside your `burger` directory, create a folder named `db`. 2. In the `db` folder, create a file named `schema.sql`. Write SQL queries this file that do the following: * Create the `burgers_db`. * Switch to or use the `burgers_db`. * Create a `burgers` table with these fields: * **id**: an auto incrementing int that serves as the primary key. * **burger_name**: a string. * **devoured**: a boolean. 3. Still in the `db` folder, create a `seeds.sql` file. In this file, write insert queries to populate the `burgers` table with at least three entries. 4. Run the `schema.sql` and `seeds.sql` files into the mysql server from the command line 5. Now you're going to run these SQL files. * Make sure you're in the `db` folder of your app. * Start MySQL command line tool and login: `mysql -u root -p`. * With the `mysql>` command line tool running, enter the command `source schema.sql`. This will run your schema file and all of the queries in it -- in other words, you'll be creating your database. * Now insert the entries you defined in `seeds.sql` by running the file: `source seeds.sql`. * Close out of the MySQL command line tool: `exit`. #### Config Setup 1. Inside your `burger` directory, create a folder named `config`. 2. Create a `connection.js` file inside `config` directory. * Inside the `connection.js` file, setup the code to connect Node to MySQL. * Export the connection. 3. Create an `orm.js` file inside `config` directory. * Import (require) `connection.js` into `orm.js` * In the `orm.js` file, create the methods that will execute the necessary MySQL commands in the controllers. These are the methods you will need to use in order to retrieve and store data in your database. * `selectAll()` * `insertOne()` * `updateOne()` * Export the ORM object in `module.exports`. #### Model setup * Inside your `burger` directory, create a folder named `models`. * In `models`, make a `burger.js` file. * Inside `burger.js`, import `orm.js` into `burger.js` * Also inside `burger.js`, create the code that will call the ORM functions using burger specific input for the ORM. * Export at the end of the `burger.js` file. #### Controller setup 1. Inside your `burger` directory, create a folder named `controllers`. 2. In `controllers`, create the `burgers_controller.js` file. 3. Inside the `burgers_controller.js` file, import the following: * Express * `burger.js` 4. Create the `router` for the app, and export the `router` at the end of your file. #### View setup 1. Inside your `burger` directory, create a folder named `views`. * Create the `index.handlebars` file inside `views` directory. * Create the `layouts` directory inside `views` directory. * Create the `main.handlebars` file inside `layouts` directory. * Setup the `main.handlebars` file so it's able to be used by Handlebars. * Setup the `index.handlebars` to have the template that Handlebars can render onto. * Create a button in `index.handlebars` that will submit the user input into the database. #### Directory structure All the recommended files and directories from the steps above should look like the following structure: ``` . ├── config │ ├── connection.js │ └── orm.js │ ├── controllers │ └── burgers_controller.js │ ├── db │ ├── schema.sql │ └── seeds.sql │ ├── models │ └── burger.js │ ├── node_modules │ ├── package.json │ ├── public │ └── assets │ ├── css │ │ └── burger_style.css │ └── img │ └── burger.png │ │ ├── server.js │ └── views ├── index.handlebars └── layouts └── main.handlebars ``` ### Reminder: Submission on BCS * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! - - - ### Minimum Requirements Attempt to complete homework assignment as described in instructions. If unable to complete certain portions, please pseudocode these portions to describe what remains to be completed. Hosting on Heroku and adding a README.md are required for this homework. In addition, add this homework to your portfolio, more information can be found below. - - - ### Hosting on Heroku Now that we have a backend to our applications, we use Heroku for hosting. Please note that while **Heroku is free**, it will request credit card information if you have more than 5 applications at a time or are adding a database. Please see [Heroku’s Account Verification Information](https://devcenter.heroku.com/articles/account-verification) for more details. - - - ### Create a README.md Add a `README.md` to your repository describing the project. Here are some resources for creating your `README.md`. Here are some resources to help you along the way: * [About READMEs](https://help.github.com/articles/about-readmes/) * [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) - - - ### Add To Your Portfolio After completing the homework please add the piece to your portfolio. Make sure to add a link to your updated portfolio in the comments section of your homework so the TAs can easily ensure you completed this step when they are grading the assignment. To receive an 'A' on any assignment, you must link to it from your portfolio. - - - ### One More Thing This is a really tough homework assignment, but we want you to put in your best effort to finish it. If you have any questions about this project or the material we have covered, please post them in the community channels in slack so that your fellow developers can help you! If you're still having trouble, you can come to office hours for assistance from your instructor and TAs. ### Reminder When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. **Good Luck!**
leshill
Precompile assets built with JavaScript compilers, for example mustache templates compiled by `handlebars.js`.
HippoRun
Node Express Handlebars Overview In this assignment, you'll create a burger logger with MySQL, Node, Express, Handlebars and a homemade ORM (yum!). Be sure to follow the MVC design pattern; use Node and MySQL to query and route data in your app, and Handlebars to generate your HTML. Important Be sure to utilize the MYSQL Heroku Deployment Guide in order to deploy your assignment. Before You Begin Eat-Da-Burger! is a restaurant app that lets users input the names of burgers they'd like to eat. Whenever a user submits a burger's name, your app will display the burger on the left side of the page -- waiting to be devoured. Each burger in the waiting area also has a Devour it! button. When the user clicks it, the burger will move to the right side of the page. Your app will store every burger in a database, whether devoured or not. Check out this video of the app for a run-through of how it works. Submission on BCS Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! Instructions App Setup Create a GitHub repo called burger and clone it to your computer. Make a package.json file by running npm init from the command line. Install the Express npm package: npm install express. Create a server.js file. Install the Handlebars npm package: npm install express-handlebars. Install the body-parser npm package: npm install body-parser. Install MySQL npm package: npm install mysql. Require the following npm packages inside of the server.js file: express body-parser DB Setup Inside your burger directory, create a folder named db. In the db folder, create a file named schema.sql. Write SQL queries this file that do the following: Create the burgers_db. Switch to or use the burgers_db. Create a burgers table with these fields: id: an auto incrementing int that serves as the primary key. burger_name: a string. devoured: a boolean. Still in the db folder, create a seeds.sql file. In this file, write insert queries to populate the burgers table with at least three entries. Run the schema.sql and seeds.sql files into the mysql server from the command line Now you're going to run these SQL files. Make sure you're in the db folder of your app. Start MySQL command line tool and login: mysql -u root -p. With the mysql> command line tool running, enter the command source schema.sql. This will run your schema file and all of the queries in it -- in other words, you'll be creating your database. Now insert the entries you defined in seeds.sql by running the file: source seeds.sql. Close out of the MySQL command line tool: exit. Config Setup Inside your burger directory, create a folder named config. Create a connection.js file inside config directory. Inside the connection.js file, setup the code to connect Node to MySQL. Export the connection. Create an orm.js file inside config directory. Import (require) connection.js into orm.js In the orm.js file, create the methods that will execute the necessary MySQL commands in the controllers. These are the methods you will need to use in order to retrieve and store data in your database. selectAll() insertOne() updateOne() Export the ORM object in module.exports. Model setup Inside your burger directory, create a folder named models. In models, make a burger.js file. Inside burger.js, import orm.js into burger.js Also inside burger.js, create the code that will call the ORM functions using burger specific input for the ORM. Export at the end of the burger.js file. Controller setup Inside your burger directory, create a folder named controllers. In controllers, create the burgers_controller.js file. Inside the burgers_controller.js file, import the following: Express burger.js Create the router for the app, and export the router at the end of your file. View setup Inside your burger directory, create a folder named views. Create the index.handlebars file inside views directory. Create the layouts directory inside views directory. Create the main.handlebars file inside layouts directory. Setup the main.handlebars file so it's able to be used by Handlebars. Setup the index.handlebars to have the template that Handlebars can render onto. Create a button in index.handlebars that will submit the user input into the database. Directory structure All the recommended files and directories from the steps above should look like the following structure: . ├── config │ ├── connection.js │ └── orm.js │ ├── controllers │ └── burgers_controller.js │ ├── db │ ├── schema.sql │ └── seeds.sql │ ├── models │ └── burger.js │ ├── node_modules │ ├── package.json │ ├── public │ └── assets │ ├── css │ │ └── burger_style.css │ └── img │ └── burger.png │ │ ├── server.js │ └── views ├── index.handlebars └── layouts └── main.handlebars Reminder: Submission on BCS Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! Minimum Requirements Attempt to complete homework assignment as described in instructions. If unable to complete certain portions, please pseudocode these portions to describe what remains to be completed. Hosting on Heroku and adding a README.md are required for this homework. In addition, add this homework to your portfolio, more information can be found below. Hosting on Heroku Now that we have a backend to our applications, we use Heroku for hosting. Please note that while Heroku is free, it will request credit card information if you have more than 5 applications at a time or are adding a database. Please see Heroku’s Account Verification Information for more details. Create a README.md Add a README.md to your repository describing the project. Here are some resources for creating your README.md. Here are some resources to help you along the way: About READMEs Mastering Markdown Add To Your Portfolio After completing the homework please add the piece to your portfolio. Make sure to add a link to your updated portfolio in the comments section of your homework so the TAs can easily ensure you completed this step when they are grading the assignment. To receive an 'A' on any assignment, you must link to it from your portfolio. One More Thing This is a really tough homework assignment, but we want you to put in your best effort to finish it. If you have any questions about this project or the material we have covered, please post them in the community channels in slack so that your fellow developers can help you! If you're still having trouble, you can come to office hours for assistance from your instructor and TAs. Good Luck!
webdevelopmentdiva
# Node Express Handlebars ### Overview In this assignment, you'll create a burger logger with MySQL, Node, Express, Handlebars and a homemade ORM (yum!). Be sure to follow the MVC design pattern; use Node and MySQL to query and route data in your app, and Handlebars to generate your HTML. ### Read This When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. ### Important * **This assignment must be deployed.** Be sure to utilize the [MYSQL Heroku Deployment Guide](../../03-Supplemental/MySQLHerokuDeploymentProcess.pdf) in order to deploy your assignment. ### Before You Begin * Eat-Da-Burger! is a restaurant app that lets users input the names of burgers they'd like to eat. * Whenever a user submits a burger's name, your app will display the burger on the left side of the page -- waiting to be devoured. * Each burger in the waiting area also has a `Devour it!` button. When the user clicks it, the burger will move to the right side of the page. * Your app will store every burger in a database, whether devoured or not. * [Check out this video of the app for a run-through of how it works](https://youtu.be/msvdn95x9OM). ### Commits Having an active and healthy commit history on GitHub is important for your future job search. It is also extremely important for making sure your work is saved in your repository. If something breaks, committing often ensures you are able to go back to a working version of your code. * Committing often is a signal to employers that you are actively working on your code and learning. * We use the mantra “commit early and often.” This means that when you write code that works, add it and commit it! * Numerous commits allow you to see how your app is progressing and give you a point to revert to if anything goes wrong. * Be clear and descriptive in your commit messaging. * When writing a commit message, avoid vague messages like "fixed." Be descriptive so that you and anyone else looking at your repository knows what happened with each commit. * We would like you to have well over 200 commits by graduation, so commit early and often! ### Submission on BCS * **This assignment must be deployed.** * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! ## Instructions #### App Setup 1. Create a GitHub repo called `burger` and clone it to your computer. 2. Make a package.json file by running `npm init` from the command line. 3. Install the Express npm package: `npm install express`. 4. Create a server.js file. 5. Install the Handlebars npm package: `npm install express-handlebars`. 6. Install MySQL npm package: `npm install mysql`. 7. Require the following npm packages inside of the server.js file: * express #### DB Setup 1. Inside your `burger` directory, create a folder named `db`. 2. In the `db` folder, create a file named `schema.sql`. Write SQL queries this file that do the following: * Create the `burgers_db`. * Switch to or use the `burgers_db`. * Create a `burgers` table with these fields: * **id**: an auto incrementing int that serves as the primary key. * **burger_name**: a string. * **devoured**: a boolean. 3. Still in the `db` folder, create a `seeds.sql` file. In this file, write insert queries to populate the `burgers` table with at least three entries. 4. Run the `schema.sql` and `seeds.sql` files into the mysql server from the command line 5. Now you're going to run these SQL files. * Make sure you're in the `db` folder of your app. * Start MySQL command line tool and login: `mysql -u root -p`. * With the `mysql>` command line tool running, enter the command `source schema.sql`. This will run your schema file and all of the queries in it -- in other words, you'll be creating your database. * Now insert the entries you defined in `seeds.sql` by running the file: `source seeds.sql`. * Close out of the MySQL command line tool: `exit`. #### Config Setup 1. Inside your `burger` directory, create a folder named `config`. 2. Create a `connection.js` file inside `config` directory. * Inside the `connection.js` file, setup the code to connect Node to MySQL. * Export the connection. 3. Create an `orm.js` file inside `config` directory. * Import (require) `connection.js` into `orm.js` * In the `orm.js` file, create the methods that will execute the necessary MySQL commands in the controllers. These are the methods you will need to use in order to retrieve and store data in your database. * `selectAll()` * `insertOne()` * `updateOne()` * Export the ORM object in `module.exports`. #### Model setup * Inside your `burger` directory, create a folder named `models`. * In `models`, make a `burger.js` file. * Inside `burger.js`, import `orm.js` into `burger.js` * Also inside `burger.js`, create the code that will call the ORM functions using burger specific input for the ORM. * Export at the end of the `burger.js` file. #### Controller setup 1. Inside your `burger` directory, create a folder named `controllers`. 2. In `controllers`, create the `burgers_controller.js` file. 3. Inside the `burgers_controller.js` file, import the following: * Express * `burger.js` 4. Create the `router` for the app, and export the `router` at the end of your file. #### View setup 1. Inside your `burger` directory, create a folder named `views`. * Create the `index.handlebars` file inside `views` directory. * Create the `layouts` directory inside `views` directory. * Create the `main.handlebars` file inside `layouts` directory. * Setup the `main.handlebars` file so it's able to be used by Handlebars. * Setup the `index.handlebars` to have the template that Handlebars can render onto. * Create a button in `index.handlebars` that will submit the user input into the database. #### Directory structure All the recommended files and directories from the steps above should look like the following structure: ``` . ├── config │ ├── connection.js │ └── orm.js │ ├── controllers │ └── burgers_controller.js │ ├── db │ ├── schema.sql │ └── seeds.sql │ ├── models │ └── burger.js │ ├── node_modules │ ├── package.json │ ├── public │ └── assets │ ├── css │ │ └── burger_style.css │ └── img │ └── burger.png │ │ ├── server.js │ └── views ├── index.handlebars └── layouts └── main.handlebars ``` ### Reminder: Submission on BCS * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! - - - ### Minimum Requirements Attempt to complete homework assignment as described in instructions. If unable to complete certain portions, please pseudocode these portions to describe what remains to be completed. Hosting on Heroku and adding a README.md are required for this homework. In addition, add this homework to your portfolio, more information can be found below. - - - ### Hosting on Heroku Now that we have a backend to our applications, we use Heroku for hosting. Please note that while **Heroku is free**, it will request credit card information if you have more than 5 applications at a time or are adding a database. Please see [Heroku’s Account Verification Information](https://devcenter.heroku.com/articles/account-verification) for more details. - - - ### Create a README.md Add a `README.md` to your repository describing the project. Here are some resources for creating your `README.md`. Here are some resources to help you along the way: * [About READMEs](https://help.github.com/articles/about-readmes/) * [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) - - - ### Add To Your Portfolio After completing the homework please add the piece to your portfolio. Make sure to add a link to your updated portfolio in the comments section of your homework so the TAs can easily ensure you completed this step when they are grading the assignment. To receive an 'A' on any assignment, you must link to it from your portfolio. - - - ### One More Thing This is a really tough homework assignment, but we want you to put in your best effort to finish it. If you have any questions about this project or the material we have covered, please post them in the community channels in slack so that your fellow developers can help you! If you're still having trouble, you can come to office hours for assistance from your instructor and TAs. ### Reminder When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. **Good Luck!**
ssachtleben
An SBT plugin to precompile handlebar templates
ssachtleben
An example project shows "sbt-assets-concat", "sbt-assets-define", "sbt-assets-filter" and "sbt-assets-handlebars"
jimkiely-brainiacdevs
This is a note js, express, and handlebars boilerplate implementation of the Assets.CMS.gov assets.
Unbukn
# Node Express Handlebars ### Overview In this assignment, you'll create a burger logger with MySQL, Node, Express, Handlebars and a homemade ORM (yum!). Be sure to follow the MVC design pattern; use Node and MySQL to query and route data in your app, and Handlebars to generate your HTML. ### Read This When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. ### Important * **This assignment must be deployed.** Be sure to utilize the [MYSQL Heroku Deployment Guide](../../03-Supplemental/MySQLHerokuDeploymentProcess.pdf) in order to deploy your assignment. ### Before You Begin * Eat-Da-Burger! is a restaurant app that lets users input the names of burgers they'd like to eat. * Whenever a user submits a burger's name, your app will display the burger on the left side of the page -- waiting to be devoured. * Each burger in the waiting area also has a `Devour it!` button. When the user clicks it, the burger will move to the right side of the page. * Your app will store every burger in a database, whether devoured or not. * [Check out this video of the app for a run-through of how it works](https://youtu.be/msvdn95x9OM). ### Commits Having an active and healthy commit history on GitHub is important for your future job search. It is also extremely important for making sure your work is saved in your repository. If something breaks, committing often ensures you are able to go back to a working version of your code. * Committing often is a signal to employers that you are actively working on your code and learning. * We use the mantra “commit early and often.” This means that when you write code that works, add it and commit it! * Numerous commits allow you to see how your app is progressing and give you a point to revert to if anything goes wrong. * Be clear and descriptive in your commit messaging. * When writing a commit message, avoid vague messages like "fixed." Be descriptive so that you and anyone else looking at your repository knows what happened with each commit. * We would like you to have well over 200 commits by graduation, so commit early and often! ### Submission on BCS * **This assignment must be deployed.** * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! ## Instructions #### App Setup 1. Create a GitHub repo called `burger` and clone it to your computer. 2. Make a package.json file by running `npm init` from the command line. 3. Install the Express npm package: `npm install express`. 4. Create a server.js file. 5. Install the Handlebars npm package: `npm install express-handlebars`. 6. Install MySQL npm package: `npm install mysql`. 7. Require the following npm packages inside of the server.js file: * express #### DB Setup 1. Inside your `burger` directory, create a folder named `db`. 2. In the `db` folder, create a file named `schema.sql`. Write SQL queries this file that do the following: * Create the `burgers_db`. * Switch to or use the `burgers_db`. * Create a `burgers` table with these fields: * **id**: an auto incrementing int that serves as the primary key. * **burger_name**: a string. * **devoured**: a boolean. 3. Still in the `db` folder, create a `seeds.sql` file. In this file, write insert queries to populate the `burgers` table with at least three entries. 4. Run the `schema.sql` and `seeds.sql` files into the mysql server from the command line 5. Now you're going to run these SQL files. * Make sure you're in the `db` folder of your app. * Start MySQL command line tool and login: `mysql -u root -p`. * With the `mysql>` command line tool running, enter the command `source schema.sql`. This will run your schema file and all of the queries in it -- in other words, you'll be creating your database. * Now insert the entries you defined in `seeds.sql` by running the file: `source seeds.sql`. * Close out of the MySQL command line tool: `exit`. #### Config Setup 1. Inside your `burger` directory, create a folder named `config`. 2. Create a `connection.js` file inside `config` directory. * Inside the `connection.js` file, setup the code to connect Node to MySQL. * Export the connection. 3. Create an `orm.js` file inside `config` directory. * Import (require) `connection.js` into `orm.js` * In the `orm.js` file, create the methods that will execute the necessary MySQL commands in the controllers. These are the methods you will need to use in order to retrieve and store data in your database. * `selectAll()` * `insertOne()` * `updateOne()` * Export the ORM object in `module.exports`. #### Model setup * Inside your `burger` directory, create a folder named `models`. * In `models`, make a `burger.js` file. * Inside `burger.js`, import `orm.js` into `burger.js` * Also inside `burger.js`, create the code that will call the ORM functions using burger specific input for the ORM. * Export at the end of the `burger.js` file. #### Controller setup 1. Inside your `burger` directory, create a folder named `controllers`. 2. In `controllers`, create the `burgers_controller.js` file. 3. Inside the `burgers_controller.js` file, import the following: * Express * `burger.js` 4. Create the `router` for the app, and export the `router` at the end of your file. #### View setup 1. Inside your `burger` directory, create a folder named `views`. * Create the `index.handlebars` file inside `views` directory. * Create the `layouts` directory inside `views` directory. * Create the `main.handlebars` file inside `layouts` directory. * Setup the `main.handlebars` file so it's able to be used by Handlebars. * Setup the `index.handlebars` to have the template that Handlebars can render onto. * Create a button in `index.handlebars` that will submit the user input into the database. #### Directory structure All the recommended files and directories from the steps above should look like the following structure: ``` . ├── config │ ├── connection.js │ └── orm.js │ ├── controllers │ └── burgers_controller.js │ ├── db │ ├── schema.sql │ └── seeds.sql │ ├── models │ └── burger.js │ ├── node_modules │ ├── package.json │ ├── public │ └── assets │ ├── css │ │ └── burger_style.css │ └── img │ └── burger.png │ │ ├── server.js │ └── views ├── index.handlebars └── layouts └── main.handlebars ``` ### Reminder: Submission on BCS * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! - - - ### Minimum Requirements Attempt to complete homework assignment as described in instructions. If unable to complete certain portions, please pseudocode these portions to describe what remains to be completed. Hosting on Heroku and adding a README.md are required for this homework. In addition, add this homework to your portfolio, more information can be found below. - - - ### Hosting on Heroku Now that we have a backend to our applications, we use Heroku for hosting. Please note that while **Heroku is free**, it will request credit card information if you have more than 5 applications at a time or are adding a database. Please see [Heroku’s Account Verification Information](https://devcenter.heroku.com/articles/account-verification) for more details. - - - ### Create a README.md Add a `README.md` to your repository describing the project. Here are some resources for creating your `README.md`. Here are some resources to help you along the way: * [About READMEs](https://help.github.com/articles/about-readmes/) * [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) - - - ### Add To Your Portfolio After completing the homework please add the piece to your portfolio. Make sure to add a link to your updated portfolio in the comments section of your homework so the TAs can easily ensure you completed this step when they are grading the assignment. To receive an 'A' on any assignment, you must link to it from your portfolio. - - - ### One More Thing This is a really tough homework assignment, but we want you to put in your best effort to finish it. If you have any questions about this project or the material we have covered, please post them in the community channels in slack so that your fellow developers can help you! If you're still having trouble, you can come to office hours for assistance from your instructor and TAs. ### Reminder When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. **Good Luck!**
Kiananaik
# Node Express Handlebars ### Overview In this assignment, you'll create a burger logger with MySQL, Node, Express, Handlebars and a homemade ORM (yum!). Be sure to follow the MVC design pattern; use Node and MySQL to query and route data in your app, and Handlebars to generate your HTML. ### Read This When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. ### Important * **This assignment must be deployed.** Be sure to utilize the [MYSQL Heroku Deployment Guide](../../04-Supplemental/MySQLHerokuDeploymentProcess.pdf) in order to deploy your assignment. ### Before You Begin * Eat-Da-Burger! is a restaurant app that lets users input the names of burgers they'd like to eat. * Whenever a user submits a burger's name, your app will display the burger on the left side of the page -- waiting to be devoured. * Each burger in the waiting area also has a `Devour it!` button. When the user clicks it, the burger will move to the right side of the page. * Your app will store every burger in a database, whether devoured or not. * [Check out this video of the app for a run-through of how it works](https://youtu.be/msvdn95x9OM). ### Commits Having an active and healthy commit history on GitHub is important for your future job search. It is also extremely important for making sure your work is saved in your repository. If something breaks, committing often ensures you are able to go back to a working version of your code. * Committing often is a signal to employers that you are actively working on your code and learning. * We use the mantra “commit early and often.” This means that when you write code that works, add it and commit it! * Numerous commits allow you to see how your app is progressing and give you a point to revert to if anything goes wrong. * Be clear and descriptive in your commit messaging. * When writing a commit message, avoid vague messages like "fixed." Be descriptive so that you and anyone else looking at your repository knows what happened with each commit. * We would like you to have well over 200 commits by graduation, so commit early and often! ### Submission on BCS * **This assignment must be deployed.** * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! ## Instructions #### App Setup 1. Create a GitHub repo called `burger` and clone it to your computer. 2. Make a package.json file by running `npm init` from the command line. 3. Install the Express npm package: `npm install express`. 4. Create a server.js file. 5. Install the Handlebars npm package: `npm install express-handlebars`. 6. Install MySQL npm package: `npm install mysql`. 7. Require the following npm packages inside of the server.js file: * express #### DB Setup 1. Inside your `burger` directory, create a folder named `db`. 2. In the `db` folder, create a file named `schema.sql`. Write SQL queries this file that do the following: * Create the `burgers_db`. * Switch to or use the `burgers_db`. * Create a `burgers` table with these fields: * **id**: an auto incrementing int that serves as the primary key. * **burger_name**: a string. * **devoured**: a boolean. 3. Still in the `db` folder, create a `seeds.sql` file. In this file, write insert queries to populate the `burgers` table with at least three entries. 4. Run the `schema.sql` and `seeds.sql` files into the mysql server from the command line 5. Now you're going to run these SQL files. * Make sure you're in the `db` folder of your app. * Start MySQL command line tool and login: `mysql -u root -p`. * With the `mysql>` command line tool running, enter the command `source schema.sql`. This will run your schema file and all of the queries in it -- in other words, you'll be creating your database. * Now insert the entries you defined in `seeds.sql` by running the file: `source seeds.sql`. * Close out of the MySQL command line tool: `exit`. #### Config Setup 1. Inside your `burger` directory, create a folder named `config`. 2. Create a `connection.js` file inside `config` directory. * Inside the `connection.js` file, setup the code to connect Node to MySQL. * Export the connection. 3. Create an `orm.js` file inside `config` directory. * Import (require) `connection.js` into `orm.js` * In the `orm.js` file, create the methods that will execute the necessary MySQL commands in the controllers. These are the methods you will need to use in order to retrieve and store data in your database. * `selectAll()` * `insertOne()` * `updateOne()` * Export the ORM object in `module.exports`. #### Model setup * Inside your `burger` directory, create a folder named `models`. * In `models`, make a `burger.js` file. * Inside `burger.js`, import `orm.js` into `burger.js` * Also inside `burger.js`, create the code that will call the ORM functions using burger specific input for the ORM. * Export at the end of the `burger.js` file. #### Controller setup 1. Inside your `burger` directory, create a folder named `controllers`. 2. In `controllers`, create the `burgers_controller.js` file. 3. Inside the `burgers_controller.js` file, import the following: * Express * `burger.js` 4. Create the `router` for the app, and export the `router` at the end of your file. #### View setup 1. Inside your `burger` directory, create a folder named `views`. * Create the `index.handlebars` file inside `views` directory. * Create the `layouts` directory inside `views` directory. * Create the `main.handlebars` file inside `layouts` directory. * Setup the `main.handlebars` file so it's able to be used by Handlebars. * Setup the `index.handlebars` to have the template that Handlebars can render onto. * Create a button in `index.handlebars` that will submit the user input into the database. #### Directory structure All the recommended files and directories from the steps above should look like the following structure: ``` . ├── config │ ├── connection.js │ └── orm.js │ ├── controllers │ └── burgers_controller.js │ ├── db │ ├── schema.sql │ └── seeds.sql │ ├── models │ └── burger.js │ ├── node_modules │ ├── package.json │ ├── public │ └── assets │ ├── css │ │ └── burger_style.css │ └── img │ └── burger.png │ │ ├── server.js │ └── views ├── index.handlebars └── layouts └── main.handlebars ``` ### Reminder: Submission on BCS * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! - - - ### Minimum Requirements Attempt to complete homework assignment as described in instructions. If unable to complete certain portions, please pseudocode these portions to describe what remains to be completed. Hosting on Heroku and adding a README.md are required for this homework. In addition, add this homework to your portfolio, more information can be found below. - - - ### Hosting on Heroku Now that we have a backend to our applications, we use Heroku for hosting. Please note that while **Heroku is free**, it will request credit card information if you have more than 5 applications at a time or are adding a database. Please see [Heroku’s Account Verification Information](https://devcenter.heroku.com/articles/account-verification) for more details. - - - ### Create a README.md Add a `README.md` to your repository describing the project. Here are some resources for creating your `README.md`. Here are some resources to help you along the way: * [About READMEs](https://help.github.com/articles/about-readmes/) * [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) - - - ### Add To Your Portfolio After completing the homework please add the piece to your portfolio. Make sure to add a link to your updated portfolio in the comments section of your homework so the TAs can easily ensure you completed this step when they are grading the assignment. To receive an 'A' on any assignment, you must link to it from your portfolio. - - - ### One More Thing This is a really tough homework assignment, but we want you to put in your best effort to finish it. If you have any questions about this project or the material we have covered, please post them in the community channels in slack so that your fellow developers can help you! If you're still having trouble, you can come to office hours for assistance from your instructor and TAs. ### Reminder When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. **Good Luck!**
StevenSJones
# Node Express Handlebars ### Overview In this assignment, you'll create a burger logger with MySQL, Node, Express, Handlebars and a homemade ORM (yum!). Be sure to follow the MVC design pattern; use Node and MySQL to query and route data in your app, and Handlebars to generate your HTML. ### Read This When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. ### Important * **This assignment must be deployed.** Be sure to utilize the [MYSQL Heroku Deployment Guide](../../03-Supplemental/MySQLHerokuDeploymentProcess.pdf) in order to deploy your assignment. ### Before You Begin * Eat-Da-Burger! is a restaurant app that lets users input the names of burgers they'd like to eat. * Whenever a user submits a burger's name, your app will display the burger on the left side of the page -- waiting to be devoured. * Each burger in the waiting area also has a `Devour it!` button. When the user clicks it, the burger will move to the right side of the page. * Your app will store every burger in a database, whether devoured or not. * [Check out this video of the app for a run-through of how it works](https://youtu.be/msvdn95x9OM). ### Commits Having an active and healthy commit history on GitHub is important for your future job search. It is also extremely important for making sure your work is saved in your repository. If something breaks, committing often ensures you are able to go back to a working version of your code. * Committing often is a signal to employers that you are actively working on your code and learning. * We use the mantra “commit early and often.” This means that when you write code that works, add it and commit it! * Numerous commits allow you to see how your app is progressing and give you a point to revert to if anything goes wrong. * Be clear and descriptive in your commit messaging. * When writing a commit message, avoid vague messages like "fixed." Be descriptive so that you and anyone else looking at your repository knows what happened with each commit. * We would like you to have well over 200 commits by graduation, so commit early and often! ### Submission on BCS * **This assignment must be deployed.** * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! ## Instructions #### App Setup 1. Create a GitHub repo called `burger` and clone it to your computer. 2. Make a package.json file by running `npm init` from the command line. 3. Install the Express npm package: `npm install express`. 4. Create a server.js file. 5. Install the Handlebars npm package: `npm install express-handlebars`. 6. Install MySQL npm package: `npm install mysql`. 7. Require the following npm packages inside of the server.js file: * express #### DB Setup 1. Inside your `burger` directory, create a folder named `db`. 2. In the `db` folder, create a file named `schema.sql`. Write SQL queries this file that do the following: * Create the `burgers_db`. * Switch to or use the `burgers_db`. * Create a `burgers` table with these fields: * **id**: an auto incrementing int that serves as the primary key. * **burger_name**: a string. * **devoured**: a boolean. 3. Still in the `db` folder, create a `seeds.sql` file. In this file, write insert queries to populate the `burgers` table with at least three entries. 4. Run the `schema.sql` and `seeds.sql` files into the mysql server from the command line 5. Now you're going to run these SQL files. * Make sure you're in the `db` folder of your app. * Start MySQL command line tool and login: `mysql -u root -p`. * With the `mysql>` command line tool running, enter the command `source schema.sql`. This will run your schema file and all of the queries in it -- in other words, you'll be creating your database. * Now insert the entries you defined in `seeds.sql` by running the file: `source seeds.sql`. * Close out of the MySQL command line tool: `exit`. #### Config Setup 1. Inside your `burger` directory, create a folder named `config`. 2. Create a `connection.js` file inside `config` directory. * Inside the `connection.js` file, setup the code to connect Node to MySQL. * Export the connection. 3. Create an `orm.js` file inside `config` directory. * Import (require) `connection.js` into `orm.js` * In the `orm.js` file, create the methods that will execute the necessary MySQL commands in the controllers. These are the methods you will need to use in order to retrieve and store data in your database. * `selectAll()` * `insertOne()` * `updateOne()` * Export the ORM object in `module.exports`. #### Model setup * Inside your `burger` directory, create a folder named `models`. * In `models`, make a `burger.js` file. * Inside `burger.js`, import `orm.js` into `burger.js` * Also inside `burger.js`, create the code that will call the ORM functions using burger specific input for the ORM. * Export at the end of the `burger.js` file. #### Controller setup 1. Inside your `burger` directory, create a folder named `controllers`. 2. In `controllers`, create the `burgers_controller.js` file. 3. Inside the `burgers_controller.js` file, import the following: * Express * `burger.js` 4. Create the `router` for the app, and export the `router` at the end of your file. #### View setup 1. Inside your `burger` directory, create a folder named `views`. * Create the `index.handlebars` file inside `views` directory. * Create the `layouts` directory inside `views` directory. * Create the `main.handlebars` file inside `layouts` directory. * Setup the `main.handlebars` file so it's able to be used by Handlebars. * Setup the `index.handlebars` to have the template that Handlebars can render onto. * Create a button in `index.handlebars` that will submit the user input into the database. #### Directory structure All the recommended files and directories from the steps above should look like the following structure: ``` . ├── config │ ├── connection.js │ └── orm.js │ ├── controllers │ └── burgers_controller.js │ ├── db │ ├── schema.sql │ └── seeds.sql │ ├── models │ └── burger.js │ ├── node_modules │ ├── package.json │ ├── public │ └── assets │ ├── css │ │ └── burger_style.css │ └── img │ └── burger.png │ │ ├── server.js │ └── views ├── index.handlebars └── layouts └── main.handlebars ``` ### Reminder: Submission on BCS * Please submit both the deployed Heroku link to your homework AND the link to the Github Repository! - - - ### Minimum Requirements Attempt to complete homework assignment as described in instructions. If unable to complete certain portions, please pseudocode these portions to describe what remains to be completed. Hosting on Heroku and adding a README.md are required for this homework. In addition, add this homework to your portfolio, more information can be found below. - - - ### Hosting on Heroku Now that we have a backend to our applications, we use Heroku for hosting. Please note that while **Heroku is free**, it will request credit card information if you have more than 5 applications at a time or are adding a database. Please see [Heroku’s Account Verification Information](https://devcenter.heroku.com/articles/account-verification) for more details. - - - ### Create a README.md Add a `README.md` to your repository describing the project. Here are some resources for creating your `README.md`. Here are some resources to help you along the way: * [About READMEs](https://help.github.com/articles/about-readmes/) * [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) - - - ### Add To Your Portfolio After completing the homework please add the piece to your portfolio. Make sure to add a link to your updated portfolio in the comments section of your homework so the TAs can easily ensure you completed this step when they are grading the assignment. To receive an 'A' on any assignment, you must link to it from your portfolio. - - - ### One More Thing This is a really tough homework assignment, but we want you to put in your best effort to finish it. If you have any questions about this project or the material we have covered, please post them in the community channels in slack so that your fellow developers can help you! If you're still having trouble, you can come to office hours for assistance from your instructor and TAs. ### Reminder When trying to connect remotely to your Heroku database on an open network such as a coffee shop, library, or even your University WiFi, it will be blocked. If you are experiencing a Heroku connection error, this could be why. **Good Luck!**
sthetz
No description available
jacquescrocker
changed ext from .hbs to .hba. probably don't use this repo :)
EZCall
No description available
JoshFabian
No description available
Borzik
No description available
ivan-fadieiev
No description available
No description available
artzte
A sample app incorporating the handlebars_assets gem
williamcoates
Handlebars helpers for connect-assets
JonasLopesdoO
Handlebars assets for study purposes
railsware
Very simple handlebars_assets internationalization for .hamlbars and .slimbars templates
pocket-marche
No description available
AndrewLeedham
The default Handlebars StyleguideKit provides the basic front-end assets when using the Handlebars PatternEngine. http://patternlab.io/