Create a simple pub/sub system using webhooks. It will require you to create two servers, a publisher and a subscriber.
Publisher Server Requirements
- publish a payload to topic
- subscribe to a topic to receive payloads
POST /publish/{topic}
import icons from "./icons"; | |
const breakpoints = ["480px", "900px", "1025px", "1280px"]; | |
// TODO should this be `small` medium and large | |
breakpoints.sm = breakpoints[0]; | |
breakpoints.med = breakpoints[1]; | |
breakpoints.lg = breakpoints[2]; | |
const colors = { |
import icons from "./icons"; | |
const breakpoints = ["480px", "900px", "1025px", "1280px"]; | |
// TODO should this be `small` medium and large | |
breakpoints.sm = breakpoints[0]; | |
breakpoints.med = breakpoints[1]; | |
breakpoints.lg = breakpoints[2]; | |
const colors = { |
const breakpoints = ["480px", "700px", "1025px", "1280px"]; | |
// TODO should this be `small` medium and large | |
breakpoints.sm = breakpoints[0]; | |
breakpoints.med = breakpoints[1]; | |
breakpoints.lg = breakpoints[2]; | |
const colors = { | |
primary: "#0c40fc", | |
blue: "#0c40fc", |
import React from "react"; | |
import styled from "styled-components"; | |
import { color, typography, space } from "styled-system"; | |
const Heading = styled.h1` | |
${typography} | |
${space} | |
${color} | |
`; |
<!DOCTYPE html> | |
<html > | |
<head> | |
<meta charset="UTF-8"> | |
<title>Horizons AJAX Async Example</title> | |
</head> | |
<body> | |
<h1>AJAX Async Example</h1> |
// prettier-ignore | |
const PRODUCTS_URL = "https://horizons-school-of-technology.github.io/week02/day4/examples/products.json"; | |
function getAllProductDetails(productUrls, callback) { | |
let products = []; | |
for (let i = 0; i < productUrls.length; i++) { | |
let url = productUrls[i].url; | |
$.ajax(url, { | |
success: function(productDetail) { |
.title { | |
font-family: arial; | |
font-size: 46px; | |
font-weight: normal; | |
} | |
body { | |
background-color: #f7f8f9; | |
padding: 30px; | |
} |