This is a 6 day self-paced curriculum to learn the python language and the basics of the Flask Web Framework.
-
Install Python using Pyenv, google "How to install Pyenv on X" x being your operating system
/////////////////////////////////////// | |
// Selecting an element by element, class, id | |
/////////////////////////////////////// | |
// PLAIN VANILLA JS | |
const h1 = document.querySelector("h1"); | |
const byClass = document.querySelector(".class"); | |
const byId = document.querySelector("#id"); | |
// jQuery | |
const $h1 = $("h1"); | |
const $byClass = $(".class"); |
///////////////////////////////// | |
// ./models/connection.js | |
///////////////////////////////// | |
// PURPOSE OF THIS FILE TO CONNECT TO MONGO AND EXPORT CONNECTED MONGO OBJECT | |
require("dotenv").config(); // Loads variables from .env into the process.env object | |
const mongoose = require('mongoose'); // import a fresh mongoose object | |
//connect to our db | |
mongoose.connect( |
This is a 6 day self-paced curriculum to learn the python language and the basics of the Flask Web Framework.
Install Python using Pyenv, google "How to install Pyenv on X" x being your operating system
webpack.config.json
const path = require("path")
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const config = {
mode: process.env.NODE_ENV ? process.env.NODE_ENV : "development",
module: {
webpack.config
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
module.exports = (env) => {
const { production } = env ? env : { production: false };
// Example String | |
const stringy = "| ohtml | odiv | Hello World | cdiv | chtml |"; | |
// Function that matches a string against a pattern | |
const matcher = (str) => { | |
// declare some variables | |
let tag; | |
let split; | |
/////////////////////////////// | |
// Array of Objects | |
////////////////////////////// | |
console.log("------------------------------------") | |
const dogs = [ | |
{name: "Spot", age: 6}, | |
{name: "Fluffy", age: 6}, | |
{name: "Clifford", age: 6}, | |
{name: "Lassi", age: 6}, | |
] |
//////////////////////////////////// | |
// Example of Memoization by Alex Merced of AlexMercedCoder.com | |
/////////////////////////////////// | |
const addNums = (x,y) => x + y | |
const createMemo = (thefunc) => { | |
const cache = {} |