Rate Movie Webapp - BAOT's 30 hours project
movie-rate infrastructure skeleton was taken from 'create-react-app-light' (NOT original create-react-app): https://github.com/yarindeoh/create-react-app-light
- React (JavaScript library for building user interfaces)
- babel (transpile latest javascript code to supported browser code) including support of ES6
- webpack (build tool, bundling and packaging javascript code)
- webpack-dev-server (running in dev mode)
- eslint (lint tool for auto indentation and standards)
- Redux (state management maybe will be changed in the future)
- SASS (maybe will be changed in the future to plain css)
- jest (test framework configuration is set for the future use)
- nodemon (monitor node changes and automatically restart the server)
- express (web application framework for Node.js)
- nodejs (latest version)
- npm/yarn as you wish
- IDE such as webstorm
- Mongo DB
In settings look for eslint option: enable and change it's path to point relatively to node_modules/eslint
In the development mode, we will have 2 servers running. The front end code will be served by the webpack dev server which helps with hot and live reloading. The server side Express code will be served by a node server using nodemon which helps in automatically restarting the server whenever server side code changes.
In the production mode, we will have only 1 server running. All the client side code will be bundled into static files using webpack and it will be served by the Node.js/Express application.
- Install all dependencies (backend + frontend)
yarn install
OR
npm install
***NOTE: run the server and the client in parallel from 2 terminals
- Run frontend locally in dev mode using webpack-dev-server running on port 9000
yarn dev-client
OR
npm run dev-client
- Run backend locally in dev mode using nodemon running on port 3000
yarn dev-server
OR
npm run dev-server
Optional script for fixing lint issues using eslint
yarn lint-fix
run the InitDB app by: npm run init-db
After installing MongoDB you can manipulate the db using the mongo shell. mongo shell located here: "C:\Program Files\MongoDB\Server\4.0\bin\mongo.exe". the initDB app create a db called rate-movies. after running InitDB open mongo shell and verify you have data.
- type "show dbs" and verify rate-movies is in the list
- type "use rate-movies"
- type "db.movies.find()" to see all the movies in the DB ("movies" is a collection inside the db "rate-movies")
In the future ...