Skip to content

Instantly share code, notes, and snippets.

{
"name": "mern-weather-app",
"scripts": {
"dev": "concurrently --kill-others-on-fail \"npm run server\" \"npm run client\"",
"heroku-postbuild": "cd client/src && npm install && npm run build"
},
}
@jinwook-k
jinwook-k / server.js
Last active September 24, 2020 14:39
server/server.js
// imports
const path = require('path');
// use body parser to get data from POST requests
// Use API routes from the api folder
// If in production, then use static frontend build files.
if (process.env.NODE_ENV === 'production') {
// Serve any static files
@jinwook-k
jinwook-k / WeatherForm.jsx
Last active September 21, 2020 04:37
client/src/Components/WeatherForm.jsx
// imports
class WeatherForm extends Component {
// default state values
// componentDidMount()
// refreshSaveWeather()
// onChange()
// saveFormData()
// saveToLocalStorage()
@jinwook-k
jinwook-k / .gitignore
Created September 18, 2020 13:51
General .gitignore
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
@jinwook-k
jinwook-k / index.js
Created September 20, 2020 16:39
client/src/index.js
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import Header from "./Components/Header";
import 'bootstrap/dist/css/bootstrap.min.css';
ReactDOM.render(
<React.StrictMode>