This file contains 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 axios from 'axios'; | |
import AnotherComponent from './AnotherComponent'; | |
import Todo from './Todo'; | |
import ParentComponent from './ParentComponent'; | |
export default class App extends Component { | |
constructor(props) { |
This file contains 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 axios from 'axios'; | |
import AnotherComponent from './AnotherComponent'; | |
import Todo from './Todo'; | |
import ParentComponent from './ParentComponent'; | |
export default class App extends Component { | |
constructor(props) { |
This file contains 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
var webpack = require("webpack"); | |
var path = require("path"); | |
var HtmlWebpackPlugin = require("html-webpack-plugin"); | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | |
module.exports = { | |
entry: { | |
bundle: './src/index.js' | |
}, | |
output: { |
This file contains 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 express from 'express'; | |
import path from 'path'; | |
const server = express(); | |
///note: in development, we need to have this ability of having a `live reloading experience` when changing some codes in front-end. So we need to make use of webpack libraries. | |
const webpack = require("webpack"); | |
const config = require("../../config/webpack.dev.js"); |
This file contains 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
var webpack = require("webpack"); | |
var path = require("path"); | |
var HtmlWebpackPlugin = require("html-webpack-plugin"); | |
//note: we can code split and store the vendors in separate entry to improve the performance and take advantage of caching. | |
/* | |
some gotchas: | |
-When a vendor or library is updated very often, do not include them in the `vendor` entry | |
*/ | |
const VENDOR_LIBS = [ |
This file contains 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 express = require('express'); | |
/** | |
* we need to make use of all 3 to make webpack work | |
*/ | |
const webpackMiddleware = require('webpack-dev-middleware'); //this only serves to intercept the incoming requests and handle webpack | |
const webpack = require('webpack'); //this exists to compile all of our application assets | |
const webpackConfig = require('./webpack.config.js'); //this instructs on how to run webpack correctly with configurations | |
/**END */ |
This file contains 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 "./SchemaTablesList.css"; | |
import React, { Component } from "react"; | |
import { bindActionCreators } from "redux"; | |
import { connect } from "react-redux"; | |
import _ from "lodash"; | |
import { withRouter } from "react-router-dom"; | |
/* ACTIONS */ | |
import { initializeTables, deleteTablesInSchema } from "../Actions/index"; |
This file contains 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
if (process.env.NODE_ENV === 'production') { | |
//Express will serve up production assets | |
//like our main.js file, or main.css file | |
app.use(express.static('client/build')); | |
//Express will serve up the index.html file | |
//if it doesn't recognize the route | |
//note 1: if it doesn't recognize the file being scanned above(static/client/build), then it will go through here to find the index.html file. This route is a catch-all scenario just to load the client app in express server. | |
const path = require('path'); | |
app.get('*', (req, res) => { |
This file contains 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 { Route, Switch, Link, Router, NavLink } from "react-router-dom"; | |
import SchemaTablesList from './SchemaTablesList'; | |
import Settings from './Settings'; | |
import { ToastContainer } from "react-toastr"; | |
import { connect } from "react-redux"; | |
import { bindActionCreators } from "redux"; | |
import DbSchema from './DbSchema'; |
This file contains 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, Fragment } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
class App extends Component { | |
componentDidMount() { | |
} |