$ yarn build # Builds the frontend application
$ yarn build:server # Build the server application
$ yarn server # Starts the server application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @app.route('/aggregated-measurements') | |
| def get_aggregated_measurements(): | |
| aggregated_measurements_objects = AggregatedMeasurement.query.first() | |
| # this is where the breakpoint would be | |
| import pdb; pdb.set_trace() | |
| # transforming into JSON-serializable objects | |
| aggregated_measurement_schema = AggregatedMeasurementSchema() | |
| result = aggregated_measurement_schema.dump(aggregated_measurements_objects) | |
| return jsonify(result.data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const steps = [ | |
| { | |
| text: "Step 1: Personal Details", | |
| display: true, | |
| url: "personal-info", | |
| completed: false | |
| }, | |
| { | |
| display: true, | |
| text: "Step 2: Credentials & Education", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test("When there are two different keys and one needs updating", () => { | |
| const page = [ | |
| { | |
| Awards: { | |
| awards: { | |
| heading: "Awards & Certifications", | |
| body: [ | |
| { | |
| title: "Shell Ecomarathon Award", | |
| company: "University of Lagos", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { render } from "react-dom"; | |
| import Hello from "./Hello"; | |
| const styles = { | |
| fontFamily: "sans-serif", | |
| textAlign: "center" | |
| }; | |
| class ChildComponent extends React.Component { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| High High on eagle's wings 3x | |
| Lord take me higher on eagle's wings | |
| We are going higher | |
| We are moving upward way | |
| Backward never forward ever | |
| We are moving high | |
| Verse 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Twitter @Beee_sama | |
| #Slack pythonnigeria.slack.com @B33s@m@ | |
| rates = [{ | |
| 'country': ['USA'], | |
| 'currency': 'USD', | |
| 'rate': 360 | |
| }, | |
| { | |
| 'country': ['UK'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% load staticfiles %} | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| <style> | |
| body { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To use preact, we would have | |
| /*** | |
| import { getComponent, cdn, afterScripts } from "./preact-server"; // should be the first line because of how module-alias works | |
| ***/ | |
| import { getComponent, cdn, afterScripts } from "./react-server"; | |
| const { graphqlExpress, graphiqlExpress } = require("apollo-server-express"); | |
| import Loadable from "react-loadable"; | |
| import express from "express"; | |
| import path from "path"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const nodeExternals = require('webpack-node-externals'); | |
| const path = require('path'); | |
| const srcPath = path.resolve(__dirname, 'src'); //same directory that consist of all the source code. the server app resides here | |
| const distPath = path.resolve(__dirname, 'build'); //same directory created by cra after building the frontend app | |
| module.exports = { | |
| context: srcPath, | |
| entry: 'server.js', //name of server file. | |
| output: { | |
| path: distPath, |