Giter Club home page Giter Club logo

week-7-lmao's People

Contributors

alexis-l8 avatar lucysabin avatar majakudlicka avatar oliverjam avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

majakudlicka

week-7-lmao's Issues

Doesn't always let you post a joke

I tried to post this, which didn't work:
It's my understanding that the word "algorithm" was coined to recognize Al Gore's contribution to computer science.

Then I took out the apostrophes and speech marks and it posted, not sure why?

Error handling

Several places will execute the callback twice in the error case. You need a return or an else:

https://github.com/FAC10/week-7-LMAO/blob/master/src/handler_home.js#L4
https://github.com/FAC10/week-7-LMAO/blob/master/src/postJoke.js#L5
https://github.com/FAC10/week-7-LMAO/blob/master/src/routes/post_submit.js#L8

If errors occur in handlers, be sure to always respond to the client with something, otherwise the request will hang and the user will get no feedback:

https://github.com/FAC10/week-7-LMAO/blob/master/src/routes/home.js#L9
https://github.com/FAC10/week-7-LMAO/blob/master/src/routes/post_submit.js#L8

Create Routes

We need routes for
"/" : home > "/login" : login page > "/login/submit" : post page > "/post/submit > "/"

test.hbs

test.hbs is empty

Use it or lose it.

Fix failing/broken tests

We aren't injecting a payload into the server when we test the 'POST' routes, so the test has no data to work with.

Handle database errors better

Just noticed that if the server can't reach the database all the user sees on the homepage is a JSON error object. Would be nice to catch the error and still render the page, just without any jokes visible. Maybe with a "We can't seem to find any jokes right now" message or something

index.html inside public

You're serving everything from the backend using handlebars, so you don't need the HTML file inside public.

Tests not working

I ran npm test and got the following errors:

sh: 1: tape: not found
sh: 1: tap-spec: not found

Install dependencies

Dev dependencies

Server

  • Nodemon

Testing

  • Tape, Tap-spec, Istanbul, Codecov

Linting

  • eslint

Dependencies

Server

  • Hapi

Views

  • Handlebars

Authentication

  • Bcrypt, Hapi-auth-cookie, Hapi-context-credentials

Config

  • env2

Database

  • Pg

Spruce up HTML

Currently it's confusing to read as the joke and author are rendered as <li> elements. I'm going to quickly change the template so they at least look associated.

Also the header is currently a form? I think it needs to just be links to the /login and /post routes.

Basic GUI

Templates for

  • Home page
  • Login page
  • Post page

Consistent file naming

Please could you make sure you are naming your files consistently.

I believe it's not best practice to camelCase your file names.

screen shot 2017-04-07 at 10 58 47

There is a discussion about this here.

Config file best practice

Ideally you should have an empty file called 'config.env.default' that you push to github. That way people can remove 'default' and just add the environment variables.

Doesn't like punctuation

I tried to write a hilarious joke but your app didn't post anything - I think because it didn't like the punctuation. I had to spell things incorrectly instead ๐Ÿ˜ญ

Add learnings

Especially around setting up a database on Travis

Favicon

This is a very small (but fun to fix) issue. When I first loaded your app I got error saying that your favicon was not loading (because you don't have one)

screen shot 2017-04-07 at 10 38 54

I usually create one using this http://www.favicon-generator.org/

Heroku link on readme

Your link to the project on your README goes to https but the one at the top of your page goes to http.

I can't access the https one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.