Skip to content

Instantly share code, notes, and snippets.

@LuisOsta
LuisOsta / index.js
Last active January 24, 2019 15:10
Basic index.js
const express = require("express");
const path = require("path");
const hbs = require("hbs");
const app = express();
let PORT = 8080;
// servers any appropriate static files(i.e. css, js, etc)
const publicPath = path.join(__dirname, "../../public");
app.use(express.static(publicPath));
// setups hbs view path, where express will look for files
@LuisOsta
LuisOsta / home.hbs
Created January 24, 2019 15:53
First template page for handlebars
<!DOCTYPE html>
<html lang="en">
<head>
<title>Handlebars Project</title>
<meta name="description" content="This is a meta description tag" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="css/main.css">
</head>
@LuisOsta
LuisOsta / main.css
Created January 24, 2019 15:53
Our basic css to create simple styling
.nav-list {
display: inline-block;
}
.nav-list li{
display: inline;
}
.nav-list li:first-child {
margin-right: 25vw;
}
@LuisOsta
LuisOsta / home.hbs
Created January 26, 2019 04:01
Refactored Home File
<!DOCTYPE html>
<html lang="en">
<head>
<title>Handlebars Project</title>
<meta name="description" content="This is a meta description tag" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="css/main.css">
</head>
@LuisOsta
LuisOsta / header.hbs
Created January 26, 2019 04:12
updated header.hbs
<header>
{{!-- Here's where the site navigation will go --}}
<nav class="nav-container">
<ul class="nav-list">
<li class="nav-logo">Logo</li>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
<li><a href="/more">More</a></li>
</ul>
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:QmePdm21DNFojfCz2NTivh7G73okQqGjd3kakttWaXELFr ✅
Create your profile today to start building social connection and trust online at https://3Box.io/

Why Containerize Your Gatsby Application?

Ease Of Development & Deployment

Anyone who has had to work with other developers working with different Operating Systems knows the strange bugs and issues that come up due to OS specific issues.

Furthermore, managing the dependencies and configurations needed for production deployment can be extremely time consuming.

Docker fixes these issues by:

Seeding Data Into MongoDB Using Docker

Modern applications are, at least to some extent, data-rich. What this means is that often times applications will have features like the Twitter Feed, aggregated statistics, friends/followers and many other features that rely on complex inter-related data.

Its this data that provides the vast majority of the application value. Twitter would be quite useless if the only thing you could do is post and could only see a handful of others' tweets.

The biggest pitfall most developers can fall to is re-using the production database for development

Due to the complexity of this data, during the early development process of an application, its tempting to use the same database for production as for development.