Giter VIP home page Giter VIP logo

turo_hotwire's Introduction

Turo Code Challenge: Search for rental cars with the Hotwire API

View the Demo

https://hotwire-dev.us-west-1.elasticbeanstalk.com

Get It Running Locally

This project expects a development environment running Node 4.4.3 and NPM 2.15.1

Clone the repo, and then:

npm install
npm start

The app will be running locally in development mode on localhost:3000

Connect mobile devices to the app (as long as they’re on the same local wireless network as the dev machine) by pointing them to the local IP of the dev machine, port 3000.

When running in development mode, changes to React components and scss files will be pushed to clients via webpack-hot-middleware.

Ingredients

This is a ‘universal’ app, built with Node, Express, Webpack, React, React-Router, and Redux.

It’s deployed on Amazon Web Services Elastic Beanstalk.

Initial requests from the client trigger a server-side render of the view. HTML and CSS are sent to the client, along with the initial server-determined Redux state and the Webpacked client-side JavaScript.

The browser renders the static page while loading the JS bundle. Once ready, React rehydrates the Redux store, and takes over user interaction and routing on the client. Additional requests for data are made asyncronously via Redux ‘thunk’ actions to separate routes on the server that return JSON only.

The overall structure of the project is based heavily on Jared Palmer's React Production Starter. However, this app removes route-based code splitting (it’s overkill here), and adds a naive implementation of cache busting for Node's require tree when in development mode. This keeps server-side renders up to date with components that may have been changed by hot module replacement.

turo_hotwire's People

Contributors

gannoncurran avatar

Stargazers

 avatar

Forkers

kassablanka

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.