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, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import Amplify, { Auth } from 'aws-amplify'; | |
import aws_exports from './aws-exports'; | |
import { withAuthenticator } from 'aws-amplify-react'; | |
Amplify.Logger.LOG_LEVEL = 'DEBUG'; | |
Amplify.configure(aws_exports); |
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 React = require('react'); | |
const fs = require('fs-extra'); | |
const path = require('path'); | |
const readMetadata = require('../../server/readMetadata.js'); | |
const CompLibrary = require('../../core/CompLibrary.js'); | |
const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */ | |
const join = path.join; | |
const CWD = process.cwd(); |
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
/** | |
* Example of simulating file upload post form from node.js | |
* | |
* Set your own file and server options. | |
*/ | |
var img = require('fs').readFileSync('./sample.png'); | |
var options = { host: '...' | |
, port: ... |
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
/** | |
* Path array: [method, pattern, function] | |
* | |
* Usage in app.js: | |
* var dispatcher = require('./routes').getDispatcher(app); | |
* | |
* dispatcher.routes('root', | |
* ['get', '/', 'index'] | |
* ); | |
* |