Skip to content

Commit 2919438

Browse files
committed
added games hub app
1 parent 29c396b commit 2919438

File tree

2 files changed

+787
-0
lines changed

2 files changed

+787
-0
lines changed

markdown_layouts.md

+213
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,216 @@ Families of Musical Instruments
7070

7171
<br />
7272
</details>
73+
74+
75+
76+
77+
78+
79+
<details>
80+
<summary>
81+
Teas & Biscuits - Express Rest API
82+
</summary>
83+
<br />
84+
85+
<details>
86+
<summary>
87+
~/client/public/ **index.html**
88+
</summary>
89+
90+
```html
91+
92+
93+
```
94+
<br />
95+
</details>
96+
97+
<details>
98+
<summary>
99+
~/client/src/models/ **consumables.js**
100+
</summary>
101+
102+
```js
103+
104+
105+
106+
```
107+
<br />
108+
</details>
109+
110+
<details>
111+
<summary>
112+
~/client/src/helpers
113+
</summary>
114+
<br />
115+
116+
<details>
117+
<summary>
118+
**pub_sub.js**
119+
</summary>
120+
121+
```js
122+
123+
const PubSub = {
124+
publish: function (channel, payload) {
125+
const event = new CustomEvent(channel, {
126+
detail: payload
127+
});
128+
document.dispatchEvent(event);
129+
},
130+
131+
subscribe: function (channel, callback) {
132+
document.addEventListener(channel, callback);
133+
}
134+
};
135+
136+
module.exports = PubSub;
137+
138+
```
139+
<br />
140+
</details>
141+
142+
<details>
143+
<summary>
144+
**request.js**
145+
</summary>
146+
147+
```js
148+
149+
const Request = function (url) {
150+
this.url = url;
151+
};
152+
153+
Request.prototype.get = function () {
154+
return fetch(this.url)
155+
.then((response) => response.json());
156+
};
157+
158+
Request.prototype.post = function (payload) {
159+
return fetch(this.url, {
160+
method: 'POST',
161+
body: JSON.stringify(payload),
162+
headers: { 'Content-Type': 'application/json' }
163+
})
164+
.then(response => response.json());
165+
};
166+
167+
module.exports = Request;
168+
169+
```
170+
<br />
171+
</details>
172+
173+
<br />
174+
</details>
175+
176+
<details>
177+
<summary>
178+
~/client/src/views
179+
</summary>
180+
<br />
181+
182+
<details>
183+
<summary>
184+
**form_view.js**
185+
</summary>
186+
187+
```js
188+
189+
190+
191+
```
192+
<br />
193+
</details>
194+
195+
<details>
196+
<summary>
197+
**list_view.js**
198+
</summary>
199+
200+
```js
201+
202+
203+
204+
```
205+
<br />
206+
</details>
207+
208+
<br />
209+
</details>
210+
211+
212+
<details>
213+
<summary>
214+
~/client/src/ **app.js**
215+
</summary>
216+
217+
```js
218+
219+
220+
221+
```
222+
<br />
223+
</details>
224+
225+
<details>
226+
<summary>
227+
~/server
228+
</summary>
229+
<br />
230+
231+
<details>
232+
<summary>
233+
**server.js**
234+
</summary>
235+
236+
```js
237+
238+
239+
```
240+
<br />
241+
</details>
242+
243+
<details>
244+
<summary>
245+
/routers/ **biscuits_router.js**
246+
</summary>
247+
248+
```js
249+
250+
251+
252+
```
253+
<br />
254+
</details>
255+
256+
<details>
257+
<summary>
258+
/routers/ **index_router.js**
259+
</summary>
260+
261+
```js
262+
263+
264+
```
265+
<br />
266+
</details>
267+
268+
<details>
269+
<summary>
270+
/routers/ **teas_router.js**
271+
</summary>
272+
273+
```js
274+
275+
276+
```
277+
<br />
278+
</details>
279+
280+
<br />
281+
</details>
282+
283+
284+
<br />
285+
</details>

0 commit comments

Comments
 (0)