/weatherapp

Primary LanguageJavaScript

Weather API

Setup React

  • Setup folder with npm and git

$ mkdir my-app $ cd my-app $ npm init

$ git init .

$ mkdir src $ cd src

  • Create HTML and Javascript(React) File

$ touch index.html $ touch index.js

Setup Webpack

  • Install webpack $ npm install react react-dom

$ npm install webpack webpack-cli webpack-dev-server --save-dev

  • Add configuration file $ touch webpack.config.js

$ npm install html-webpack-plugin --save-dev

Setup Babel

  • Configure webpack to use babel

$ npm install @babel/core babel-loader --save-dev

$ npm install @babel/preset-env @babel/preset-react --save-dev

Build and Run

$ npm run build

Concurrently package utilized to run both server and client

$ npm run dev