Skip to content

Instantly share code, notes, and snippets.

https://steady-lamp.glitch.me/
https://troubled-jam.glitch.me/
// 1
SELECT * FROM restaurants;
// 2
SELECT * FROM restaurants
WHERE cuisine = 'Italian';
// 3
SELECT id, name FROM restaurants
db.restaurants.find()
db.restaurants.
find().
sort({name: 1}).
limit(10)
var myId = db.restaurants.findOne({}, {_id: true})._id
db.restaurants.findOne({_id: myId})
Goals:
The application will allow users to find other Fortnite players to play with.
Pass the Thinkful capstone
Features:
Must:
View posts
Create Posts
'use strict';
const express = require('express');
const bodyParser = require('body-parser');
const {User} = require('./models');
const router = express.Router();
const jsonParser = bodyParser.json();
@cbandara
cbandara / user-feedback
Created June 3, 2019 03:43
User Feedback for Fortnite LFG
Do my users think the app is interesting or valuable?
After interviewing users I found that they did enjoy my app and found it useful but they all mentioned that there are many other websites that do this but almost everyone uses Discord servers to find other people to play with. I think that this is because Discord has the most traffic and its very easy to set up a group voice chat after finding players on discord since it is a VOIP app.
Did my users use the app as I intended?
Did my users encounter any bugs or broken features?
Did my users understand how to use the app?
@cbandara
cbandara / react-nav-bar
Created June 5, 2019 03:08
react navigation bar example
import React from 'react';
import './navigation-bar.css';
// The NavigationBar component goes here. It should be the default export.
export default function NavigationBar(props) {
const links = props.links.map((link, index) => (
<li key={index}>
<a href={link.href}>
@cbandara
cbandara / server.js
Created June 9, 2019 06:01
RESTful API
const express = require("express");
const app = express();
app.get("/", (req, res) => {
const message = "Hello world";
res.send(message);
});
app.listen(process.env.PORT || 8080, () => {
console.log(`Your app is listening on port ${process.env.PORT || 8080}`);
@cbandara
cbandara / models.js
Created June 11, 2019 22:03
Blog App
const mongoose = require("mongoose");
const postSchema = mongoose.Schema({
title: String,
message: String
});
postSchema.methods.serialize = function() {
return {
id: this._id,
@cbandara
cbandara / server.js
Last active June 11, 2019 22:36
Blog App
const express = require("express");
const app = express();
const mongoose = require("mongoose");
const Post = require("./models");
const { PORT, DATABASE_URL } = require("./config");
app.get("/", (req, res) => {
Post.find()
.then(posts => {