Skip to content

Instantly share code, notes, and snippets.

View maisonm's full-sized avatar
🌴
On vacation (in my mind)

Maison Moa maisonm

🌴
On vacation (in my mind)
  • Florida
View GitHub Profile
@maisonm
maisonm / index.html
Created March 22, 2018 01:26
Flexbox Example Page - HTML
<!DOCTYPE html>
<html>
<head>
<title>Flexbox Example</title>
<link type="text/css" rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css?family=Rubik" rel="stylesheet">
</head>
<body>
<div class="container">
<div id="box1" class="box">#1</div>
@maisonm
maisonm / styles.css
Last active March 23, 2018 03:42
Flexbox Example - CSS
.container {
display: flex;
background: #1c9dc5;
font-family: 'Rubik', sans-serif;
}
.box {
border: solid #333 2px;
background: #a8a8a8;
height: 150px;
.container {
display: flex;
}
.container {
display: flex;
background: #1c9dc5;
font-family: 'Rubik', sans-serif;
height: 200px;
}
.box {
border: solid #333 2px;
background: #a8a8a8;
width: 150px;
margin: 2px;
}
.container {
display: flex;
background: #1c9dc5;
font-family: 'Rubik', sans-serif;
}
.box {
border: solid #333 2px;
background: #a8a8a8;
height: 150px;
.container {
display: flex;
flex-wrap: wrap;
background: #1c9dc5;
font-family: 'Rubik', sans-serif;
height: 350px;
width: 400px;
}
#box1 {
order: 2;
}
#box2{
order: 1;
}
#box3 {
order: 4;
}
#box4{
const express = require('express');
const app = express();
const port = process.env.PORT || 5000;
// console.log that your server is up and running
app.listen(port, () => console.log(`Listening on port ${port}`));
// create a GET route
app.get('/express_backend', (req, res) => {
res.send({ express: 'YOUR EXPRESS BACKEND IS CONNECTED TO REACT' });
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
state = {
data: null
};
componentDidMount() {