GithubHelp home page GithubHelp logo

gaearon / food-lookup-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fullstackreact/food-lookup-demo

2.0 2.0 2.0 2.49 MB

A demonstration of using `create-react-app` with a server

HTML 5.90% JavaScript 71.24% CSS 1.22% Ruby 21.64%

food-lookup-demo's Introduction

create-react-app with a server example

Dolpins

This project demonstrates using the setup generated by create-react-app alongside a Node Express API server.

We have a detailed blog post that explains this repository.

Running

git clone [email protected]:fullstackreact/food-lookup-demo.git
cd food-lookup-demo
npm i
npm start

Overview

create-react-app configures a Webpack development server to run on localhost:3000. This development server will bundle all static assets located under client/src/. All requests to localhost:3000 will serve client/index.html which will include Webpack's bundle.js.

In this example, the React component App makes a request to an API server (server.js). The user's browser visits the Webpack dev server at localhost:3000. Then the React client communicates with the API server when needed at localhost:3001:

Flow diagram

This setup uses node-foreman for process management. Executing npm start instructs Foreman to boot both the Webpack dev server and the API server.

food-lookup-demo's People

Contributors

acco avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.