Git Product home page Git Product logo

react-express-starter's Introduction

React application with Express server

This project was bootstrapped with Create React App. Then an Express server was added in the server directory. The server is proxied via the proxy key in package.json.

Using this project

  1. Clone the project, change into the directory and install the dependencies.

    git clone https://github.com/philnash/react-express-starter.git
    cd react-express-starter
    npm install
  2. Create a .env file for environment variables in your server.

    touch .env
  3. Start the server

    You can start the server on its own with the command:

    npm run server

    Run the React application on its own with the command:

    npm start

    Run both applications together with the command:

    npm run dev

    The React application will run on port 3000 and the server port 3001.

React Twilio starter

The twilio branch is a similar setup but also provides endpoints with basic Access Tokens for Twilio Programmable Chat and Twilio Programmable Video. You can use the project as a base for building React chat or video applications.

react-express-starter's People

Contributors

dependabot[bot] avatar philnash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-express-starter's Issues

Not able to see React warning/errors

Hi,

Thanks for the solution. Everything works fine.

Just wanted to confirm if there is a way to keep printing the logs or console of create-react-app.

Thanks.

How would you deploy this to a server?

Especially wondering how deploying this to a server would work when webpack is involved? Can you 'build' this? If so, how? Sorry if my question is vague, I'm a beginner! Any help is much appreciated.

Thanks for your tutorial.

Deployment to netlify

Hello there!

Any idea how you would deploy this to Netlify, as can be done out-of-the-box with a normal create-react-app?

Thanks

Proxy Error: Could not proxy request

I have cloned this example and setup the project per the readme but I am getting the following error when I hit the "Submit" button.

Proxy error: Could not proxy request /api/greeting?name=Test from localhost:3000 to http://localhost:3001/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

After running "npm start dev" I get the following which indicates everything has installed and built successfully:


You can now view react-express-starter in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://10.55.0.6:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

My test machine is running Windows 10. I thought maybe it was a configuration Windows issue so I did the setup on a clean in stall of Linux Mint 19 and I am getting the exact same error. Could it be related to the versions of tools I am running? I am stuck.

npm version is 6.14.4
node version is 12.18.0

I get issue when get

I'm success get api status 200 but response "you need to enable JavaScript to run this app"
when development not problem. but when production build react i got response this.

pls help me. thanks you
image

Internal Server error

Hi there!

Tried the solution, am not able to get chat token using name, getting internal server 500 this api /chat/token.

Thanks

Proxy error

Hi,
I have the next issue when I press submit with some input.
WhatsApp Image 2021-05-01 at 10 55 31

My workstation:
-Windows 10
-Node v15.0.0
-Npm 7.10.0

Do you know what could be the problem ?

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.