Giter Site home page Giter Site logo

react-robots's Introduction

A CRUD App using React and MongoDB

MERN Stack: Mongo, Express, React, Node.

Usage

View this application in production at https://react-robots.herokuapp.com/.

Contributing

Prerequisites for Development

Install Node.

Prerequisites for Testing

Install Java.

Download selenium standalone server:

curl -O http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.0.jar

Installation

Get source code.

git clone [email protected]:s2t2/react-robots.git
cd react-robots/
npm install

Development

Seed a mongo database.

npm run db-seed

Start the web server.

npm start

Testing

Run all tests.

npm run test --silent

API Tests

Run API tests only.

npm run test-api --silent

Component Tests

Run all component tests.

npm run test-components --silent

NOTE: Component tests require a test web server to be running on localhost:3000. Use npm run start-test.

NOTE: Component tests require a webdriver server to be running on http://127.0.0.1:4444/wd/hub. Use npm run wdio-start.

Run a single component test.

npm run test-table --silent
npm run test-form --silent
npm run test-form-submit-new --silent
npm run test-form-submit-edit --silent

Deploying

Deploy master branch to production.

git push heroku master

Commands used to make this repo:

express react-robots --ejs
cd react-robots/
npm install --save webpack
npm install --save-dev webpack-dev-middleware webpack-hot-middleware
npm install --save babel-core babel-loader babel-preset-react babel-preset-es2015 style-loader css-loader
npm install --save react react-dom react-router
npm install --save jquery bootstrap file-loader url-loader
npm install --save moment-timezone json-loader
npm install --save mongoose
npm install --save-dev mocha expect supertest webdriverio babel-register babel-preset-es2017

Commands used to administer and deploy to production the first time:

heroku create react-robots
heroku addons:create mongolab:sandbox
heroku addons:create scheduler
heroku addons:open scheduler # then add a new job for `npm run db-seed-production` to run hourly

react-robots's People

Contributors

s2t2 avatar

Stargazers

Juan David Coronado Saldaña avatar Yoshi Fujimoto avatar Sugiarto avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar

react-robots's Issues

Handle Browser Refreshes

After navigating away from the root url, if the browser is refreshed, instead of throwing a 404 error, the browser should either load the proper components with the proper state, or it should abashedly redirect to the root url with a flash error message.

Steps to repro:

  1. visit root url
  2. click edit OR new OR show
  3. refresh the browser

Real-time

the robots table should update in real-time or near-real-time whenever contents of the database change

non-jquery ajax calls

Translate jquery ajax calls to vanilla javascript fetch() calls to remove jquery dependency to hasten page-load speeds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.