Skip to content

Instantly share code, notes, and snippets.

Rails - Stripe Add-on

image

Add stripe to your Gemfile.

gem 'stripe'

Run bundle install

MongoDB

MongoDB is a document database designed for ease of development and scaling. We have been using in memory data in our Express app so far. But to build our full-stack MERN application we need persistence for which we will be using MongoDB. Persistence is storing the data in some manner, so that the data is accessible even if the application is shutdown and restarted or across multiple instances of applications.


What is a document database?

  • A document is simply a data structure composed of field and value pairs, e.g.,
     {
     	name: "Luke Skywalker",
    

height: "172",

What ES6 keyword do we use to declare a variable that can be mutated?

  1. var
  2. let
  3. const
  4. def

What statement does a promise run if it resolves correctly?

  1. then
  2. try
  3. catch
@anharathoi
anharathoi / kahoots_js_revision_30_05_2019.md
Last active May 30, 2019 00:58
Kahoot quiz: JavaScript revision 30 May 2019

What keyword can we use to raise an error in JavaScript?

  1. catch
  2. try
  3. throw
  4. error

ANSWER: 3


@anharathoi
anharathoi / _javascript-introduction.md
Last active May 14, 2019 01:25
Introduction to JavaScript

1. What is JavaScript?

  • JavaScript is a programming language to make web pages interactive.

    • HTML contains the structure of a page
    • CSS determines the styling of that page
    • JavaScript determines the interactive elements of that page
  • JavaScript is a client-side scripting language. It used to be considered front-end only, but now it's also a server-side language because of NodeJS.

  • JavaScript conforms to ECMAScript specifications.

  • ECMAScript 5 is fully supported in all modern browsers.